Skip to content

Commit 0bb35aa

Browse files
authored
Rollup merge of rust-lang#77892 - est31:remove_redundant_absolute_paths, r=lcnr
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.
2 parents e284f16 + 7a79b01 commit 0bb35aa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/tests/num/int_macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ macro_rules! int_module {
204204

205205
#[test]
206206
fn test_from_str() {
207-
fn from_str<T: ::std::str::FromStr>(t: &str) -> Option<T> {
208-
::std::str::FromStr::from_str(t).ok()
207+
fn from_str<T: std::str::FromStr>(t: &str) -> Option<T> {
208+
std::str::FromStr::from_str(t).ok()
209209
}
210210
assert_eq!(from_str::<$T>("0"), Some(0 as $T));
211211
assert_eq!(from_str::<$T>("3"), Some(3 as $T));

test/src/formatters/json.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ impl<T: Write> OutputFormatter for JsonFormatter<T> {
182182
/// Base code taken form `libserialize::json::escape_str`
183183
struct EscapedString<S: AsRef<str>>(S);
184184

185-
impl<S: AsRef<str>> ::std::fmt::Display for EscapedString<S> {
186-
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
185+
impl<S: AsRef<str>> std::fmt::Display for EscapedString<S> {
186+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> ::std::fmt::Result {
187187
let mut start = 0;
188188

189189
for (i, byte) in self.0.as_ref().bytes().enumerate() {

0 commit comments

Comments
 (0)