Skip to content

Commit f2bebae

Browse files
committed
removing todos
1 parent 580b232 commit f2bebae

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

sway-core/src/language/literal.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,11 @@ impl fmt::Display for Literal {
116116
.map(|x| x.to_string())
117117
.collect::<Vec<_>>()
118118
.join(", "),
119-
Literal::Binary(_) => todo!(),
119+
Literal::Binary(content) => content
120+
.iter()
121+
.map(|x| x.to_string())
122+
.collect::<Vec<_>>()
123+
.join(", "),
120124
};
121125
write!(f, "{s}")
122126
}
@@ -160,7 +164,7 @@ impl Literal {
160164
Literal::U256(_) => TypeInfo::UnsignedInteger(IntegerBits::V256),
161165
Literal::Boolean(_) => TypeInfo::Boolean,
162166
Literal::B256(_) => TypeInfo::B256,
163-
Literal::Binary(_) => todo!(),
167+
Literal::Binary(_) => TypeInfo::RawUntypedSlice,
164168
}
165169
}
166170
}

sway-core/src/semantic_analysis/ast_node/expression/match_expression/analysis/pattern.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ impl Pattern {
180180
Literal::Boolean(b) => Pattern::Boolean(b),
181181
Literal::Numeric(x) => Pattern::Numeric(Range::from_single(x)),
182182
Literal::String(s) => Pattern::String(s.as_str().to_string()),
183-
Literal::Binary(_) => todo!(),
183+
Literal::Binary(_) => {
184+
unreachable!("literals cannot be expressed in the language yet")
185+
},
184186
}
185187
}
186188

sway-lib-std/src/codec.sw

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5345,7 +5345,6 @@ where
53455345
// END TUPLES_DECODE
53465346
use ::ops::*;
53475347

5348-
#[inline(never)]
53495348
pub fn contract_call<T, TArgs>(
53505349
contract_id: b256,
53515350
method_name: raw_slice,

0 commit comments

Comments
 (0)