Replace absolute paths with relative ones

Modern compilers allow reaching external crates
like std or core via relative paths in modules
outside of lib.rs and main.rs.
This commit is contained in:
est31 2020-10-13 10:17:05 +02:00
parent f54072bb81
commit a0fc455d30
32 changed files with 73 additions and 76 deletions

View file

@ -71,8 +71,8 @@ impl Fingerprint {
}
}
impl ::std::fmt::Display for Fingerprint {
fn fmt(&self, formatter: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
impl std::fmt::Display for Fingerprint {
fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(formatter, "{:x}-{:x}", self.0, self.1)
}
}

View file

@ -129,7 +129,7 @@ pub enum ProcessResult<O, E> {
struct ObligationTreeId(usize);
type ObligationTreeIdGenerator =
::std::iter::Map<::std::ops::RangeFrom<usize>, fn(usize) -> ObligationTreeId>;
std::iter::Map<std::ops::RangeFrom<usize>, fn(usize) -> ObligationTreeId>;
pub struct ObligationForest<O: ForestObligation> {
/// The list of obligations. In between calls to `process_obligations`,

View file

@ -93,7 +93,7 @@ impl<K: Ord, V> SortedMap<K, V> {
/// Iterate over elements, sorted by key
#[inline]
pub fn iter(&self) -> ::std::slice::Iter<'_, (K, V)> {
pub fn iter(&self) -> std::slice::Iter<'_, (K, V)> {
self.data.iter()
}
@ -134,7 +134,7 @@ impl<K: Ord, V> SortedMap<K, V> {
R: RangeBounds<K>,
{
let (start, end) = self.range_slice_indices(range);
self.data.splice(start..end, ::std::iter::empty());
self.data.splice(start..end, std::iter::empty());
}
/// Mutate all keys with the given function `f`. This mutation must not
@ -241,7 +241,7 @@ impl<K: Ord, V> SortedMap<K, V> {
impl<K: Ord, V> IntoIterator for SortedMap<K, V> {
type Item = (K, V);
type IntoIter = ::std::vec::IntoIter<(K, V)>;
type IntoIter = std::vec::IntoIter<(K, V)>;
fn into_iter(self) -> Self::IntoIter {
self.data.into_iter()

View file

@ -20,7 +20,7 @@ pub struct StableHasher {
}
impl ::std::fmt::Debug for StableHasher {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.state)
}
}