fix(rustup): Remove uses of the obsolete &a[] syntax
This commit is contained in:
committed by
Sean McArthur
parent
234fcdc3a2
commit
039e984f68
@@ -42,7 +42,7 @@ impl FromStr for EntityTag {
|
||||
type Err = ();
|
||||
fn from_str(s: &str) -> Result<EntityTag, ()> {
|
||||
let length: usize = s.len();
|
||||
let slice = &s[];
|
||||
let slice = &s[..];
|
||||
|
||||
// Early exits:
|
||||
// 1. The string is empty, or,
|
||||
|
||||
@@ -39,7 +39,7 @@ impl<T: fmt::Display> fmt::Display for QualityItem<T> {
|
||||
write!(f, "{}", self.item)
|
||||
} else {
|
||||
write!(f, "{}; q={}", self.item,
|
||||
format!("{:.3}", self.quality).trim_right_matches(&['0', '.'][]))
|
||||
format!("{:.3}", self.quality).trim_right_matches(&['0', '.'][..]))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user