1
Fork 0

Remove redundant [..]s

This commit is contained in:
est31 2021-12-03 03:06:36 +01:00
parent e6b883c74f
commit 15de4cbc4b
45 changed files with 123 additions and 127 deletions

View file

@ -132,7 +132,7 @@ impl ItemLikeVisitor<'tcx> for Collector<'tcx> {
if let Some(modifiers) = item.value_str() {
let span = item.name_value_literal_span().unwrap();
for modifier in modifiers.as_str().split(',') {
let (modifier, value) = match modifier.strip_prefix(&['+', '-'][..]) {
let (modifier, value) = match modifier.strip_prefix(&['+', '-']) {
Some(m) => (m, modifier.starts_with('+')),
None => {
sess.span_err(

View file

@ -2119,7 +2119,7 @@ impl EncodedMetadata {
#[inline]
pub fn raw_data(&self) -> &[u8] {
&self.raw_data[..]
&self.raw_data
}
}