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_expr: no_region(RunLowLevel {
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,
}),
expr_var: ll_record_var,
@ -1560,7 +1563,6 @@ fn str_from_utf8_range(symbol: Symbol, var_store: &mut VarStore) -> Def {
ret_var,
)
}
/// Str.toUtf8 : Str -> List U8
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")
}
/// Str.fromUtf8 : List U8 -> { a : Bool, b : Str, c : Nat, d : I8 }
pub fn str_from_utf8<'a, 'ctx, 'env>(
env: &Env<'a, 'ctx, 'env>,

View file

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

View file

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