Cargo fmt

This commit is contained in:
Joshua Hoeflich 2021-08-08 21:41:00 -05:00
parent c00d400d85
commit ae38a0d3ff
4 changed files with 12 additions and 12 deletions

View file

@ -1484,7 +1484,10 @@ fn str_from_utf8_range(symbol: Symbol, var_store: &mut VarStore) -> Def {
loc_pattern: no_region(Pattern::Identifier(Symbol::ARG_3)), loc_pattern: no_region(Pattern::Identifier(Symbol::ARG_3)),
loc_expr: no_region(RunLowLevel { loc_expr: no_region(RunLowLevel {
op: LowLevel::StrFromUtf8Range, op: LowLevel::StrFromUtf8Range,
args: vec![(bytes_var, Var(Symbol::ARG_1)), (arg_record_var, Var(Symbol::ARG_2))], args: vec![
(bytes_var, Var(Symbol::ARG_1)),
(arg_record_var, Var(Symbol::ARG_2)),
],
ret_var: ll_record_var, ret_var: ll_record_var,
}), }),
expr_var: ll_record_var, expr_var: ll_record_var,
@ -1560,7 +1563,6 @@ fn str_from_utf8_range(symbol: Symbol, var_store: &mut VarStore) -> Def {
ret_var, ret_var,
) )
} }
/// Str.toUtf8 : Str -> List U8 /// Str.toUtf8 : Str -> List U8
fn str_to_utf8(symbol: Symbol, var_store: &mut VarStore) -> Def { fn str_to_utf8(symbol: Symbol, var_store: &mut VarStore) -> Def {

View file

@ -306,8 +306,6 @@ pub fn str_from_utf8_range<'a, 'ctx, 'env>(
builder.build_load(result_ptr_cast, "load_utf8_validate_bytes_result") builder.build_load(result_ptr_cast, "load_utf8_validate_bytes_result")
} }
/// Str.fromUtf8 : List U8 -> { a : Bool, b : Str, c : Nat, d : I8 } /// Str.fromUtf8 : List U8 -> { a : Bool, b : Str, c : Nat, d : I8 }
pub fn str_from_utf8<'a, 'ctx, 'env>( pub fn str_from_utf8<'a, 'ctx, 'env>(
env: &Env<'a, 'ctx, 'env>, env: &Env<'a, 'ctx, 'env>,

View file

@ -111,12 +111,12 @@ impl LowLevel {
match self { match self {
StrConcat | StrJoinWith | StrIsEmpty | StrStartsWith | StrStartsWithCodePt StrConcat | StrJoinWith | StrIsEmpty | StrStartsWith | StrStartsWithCodePt
| StrEndsWith | StrSplit | StrCountGraphemes | StrFromInt | StrFromUtf8 | StrFromUtf8Range | StrToUtf8 | StrEndsWith | StrSplit | StrCountGraphemes | StrFromInt | StrFromUtf8
| StrFromFloat | ListLen | ListGetUnsafe | ListSet | ListDrop | ListSingle | StrFromUtf8Range | StrToUtf8 | StrFromFloat | ListLen | ListGetUnsafe | ListSet
| ListRepeat | ListReverse | ListConcat | ListContains | ListAppend | ListPrepend | ListDrop | ListSingle | ListRepeat | ListReverse | ListConcat | ListContains
| ListJoin | ListRange | ListSwap | DictSize | DictEmpty | DictInsert | DictRemove | ListAppend | ListPrepend | ListJoin | ListRange | ListSwap | DictSize | DictEmpty
| DictContains | DictGetUnsafe | DictKeys | DictValues | DictUnion | DictInsert | DictRemove | DictContains | DictGetUnsafe | DictKeys | DictValues
| DictIntersection | DictDifference | SetFromList | NumAdd | NumAddWrap | DictUnion | DictIntersection | DictDifference | SetFromList | NumAdd | NumAddWrap
| NumAddChecked | NumSub | NumSubWrap | NumSubChecked | NumMul | NumMulWrap | NumAddChecked | NumSub | NumSubWrap | NumSubChecked | NumMul | NumMulWrap
| NumMulChecked | NumGt | NumGte | NumLt | NumLte | NumCompare | NumDivUnchecked | NumMulChecked | NumGt | NumGte | NumLt | NumLte | NumCompare | NumDivUnchecked
| NumRemUnchecked | NumIsMultipleOf | NumAbs | NumNeg | NumSin | NumCos | NumRemUnchecked | NumIsMultipleOf | NumAbs | NumNeg | NumSin | NumCos

View file

@ -866,7 +866,7 @@ fn str_from_utf8_range_slice() {
#[test] #[test]
fn str_from_utf8_range_slice_not_end() { fn str_from_utf8_range_slice_not_end() {
assert_evals_to!( assert_evals_to!(
indoc!( indoc!(
r#" r#"
bytes = Str.toUtf8 "hello" bytes = Str.toUtf8 "hello"
when Str.fromUtf8Range bytes { count: 3, start: 1 } is when Str.fromUtf8Range bytes { count: 3, start: 1 } is
@ -882,7 +882,7 @@ fn str_from_utf8_range_slice_not_end() {
#[test] #[test]
fn str_from_utf8_range_order_does_not_matter() { fn str_from_utf8_range_order_does_not_matter() {
assert_evals_to!( assert_evals_to!(
indoc!( indoc!(
r#" r#"
bytes = Str.toUtf8 "hello" bytes = Str.toUtf8 "hello"
when Str.fromUtf8Range bytes { start: 1, count: 3 } is when Str.fromUtf8Range bytes { start: 1, count: 3 } is