Skip to content

Commit

Permalink
Remove weird spaces in asm arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
crodas committed Dec 21, 2023
1 parent 15031c2 commit 4550c29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion swayfmt/src/utils/language/expr/asm_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ fn format_asm_block(
formatter
.shape
.code_line
.update_line_style(LineStyle::Inline);
.update_line_style(LineStyle::Normal);

let mut inline_arguments = FormattedCode::new();
asm_block
Expand Down
6 changes: 3 additions & 3 deletions swayfmt/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,7 @@ fn foo() {
r#"library;
fn foo() {
asm( r1: self, r2: other, r3, r4 ) {
asm(r1: self, r2: other, r3, r4) {
addi r3 zero i32;
meq r4 r1 r2 r3;
r4: bool
Expand Down Expand Up @@ -2494,7 +2494,7 @@ pub fn realloc<T>(ptr: raw_ptr, count: u64, new_count: u64) -> raw_ptr {
/// Allocates zeroed memory on the heap in individual bytes.
pub fn alloc_bytes(count: u64) -> raw_ptr {
asm( size: count, ptr ) {
asm(size: count, ptr) {
aloc size;
move ptr hp;
ptr: raw_ptr
Expand Down Expand Up @@ -2567,7 +2567,7 @@ pub fn transfer(self, asset_id: AssetId, amount: u64) {
// maintain a manual index as we only have `while` loops in sway atm:
let mut index = 0;
asm( input: input ) {
asm(input: input) {
input: u256
}
Expand Down

0 comments on commit 4550c29

Please sign in to comment.