mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 23:04:49 +00:00
auto clippy fixes
This commit is contained in:
parent
72c85efc83
commit
ef39bad7c6
146 changed files with 750 additions and 1005 deletions
|
@ -42,7 +42,7 @@ pub fn map_get<'a, K: ::std::fmt::Debug + std::hash::Hash + std::cmp::Eq, V>(
|
|||
key: &K,
|
||||
) -> UtilResult<&'a V> {
|
||||
let value = hash_map.get(key).context(KeyNotFoundSnafu {
|
||||
key_str: format!("{:?}", key),
|
||||
key_str: format!("{key:?}"),
|
||||
})?;
|
||||
|
||||
Ok(value)
|
||||
|
@ -53,8 +53,8 @@ pub fn index_of<T: ::std::fmt::Debug + std::cmp::Eq>(elt: T, slice: &[T]) -> Uti
|
|||
.iter()
|
||||
.position(|slice_elt| *slice_elt == elt)
|
||||
.with_context(|| {
|
||||
let elt_str = format!("{:?}", elt);
|
||||
let collection_str = format!("{:?}", slice);
|
||||
let elt_str = format!("{elt:?}");
|
||||
let collection_str = format!("{slice:?}");
|
||||
|
||||
IndexOfFailedSnafu {
|
||||
elt_str,
|
||||
|
@ -115,8 +115,8 @@ pub fn first_last_index_of<T: ::std::fmt::Debug + std::cmp::Eq>(
|
|||
if let (Some(first_index), Some(last_index)) = (first_index_opt, last_index_opt) {
|
||||
Ok((first_index, last_index))
|
||||
} else {
|
||||
let elt_str = format!("{:?}", elt);
|
||||
let collection_str = format!("{:?}", slice);
|
||||
let elt_str = format!("{elt:?}");
|
||||
let collection_str = format!("{slice:?}");
|
||||
|
||||
IndexOfFailedSnafu {
|
||||
elt_str,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue