Skip to content

Commit

Permalink
Fix formatting: ./x.py fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
foeb committed Jan 17, 2020
1 parent c103c28 commit 0f2ee49
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions src/libcore/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3829,9 +3829,7 @@ impl str {
j = b;
}
// SAFETY: `Searcher` is known to return valid indices.
unsafe {
self.get_unchecked(i..j)
}
unsafe { self.get_unchecked(i..j) }
}

/// Returns a string slice with all prefixes that match a pattern
Expand Down Expand Up @@ -3868,9 +3866,7 @@ impl str {
i = a;
}
// SAFETY: `Searcher` is known to return valid indices.
unsafe {
self.get_unchecked(i..self.len())
}
unsafe { self.get_unchecked(i..self.len()) }
}

/// Returns a string slice with the prefix removed.
Expand Down Expand Up @@ -3902,9 +3898,7 @@ impl str {
must include the first character"
);
// SAFETY: `Searcher` is known to return valid indices.
unsafe {
Some(self.get_unchecked(len..))
}
unsafe { Some(self.get_unchecked(len..)) }
} else {
None
}
Expand Down Expand Up @@ -3943,9 +3937,7 @@ impl str {
must include the last character"
);
// SAFETY: `Searcher` is known to return valid indices.
unsafe {
Some(self.get_unchecked(..start))
}
unsafe { Some(self.get_unchecked(..start)) }
} else {
None
}
Expand Down Expand Up @@ -3994,9 +3986,7 @@ impl str {
j = b;
}
// SAFETY: `Searcher` is known to return valid indices.
unsafe {
self.get_unchecked(0..j)
}
unsafe { self.get_unchecked(0..j) }
}

/// Returns a string slice with all prefixes that match a pattern
Expand Down

0 comments on commit 0f2ee49

Please sign in to comment.