Bug 1508670 - [mozprofile] Fix Rust code to be compatible with Rust 2018 edition. r=ato
authorHenrik Skupin <mail@hskupin.info>
Thu, 29 Nov 2018 20:43:30 +0000
changeset 505362 a359ecc0ef3a882673b5f64e15bfc7161b13088e
parent 505361 b8880c9c9151cdc85e8ce685d5667a57443da16b
child 505363 010ddcfda3180588d5b3cf830091e33e3e854da9
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1508670
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508670 - [mozprofile] Fix Rust code to be compatible with Rust 2018 edition. r=ato Depends on D13395 Differential Revision: https://phabricator.services.mozilla.com/D13396
testing/mozbase/rust/mozprofile/src/lib.rs
testing/mozbase/rust/mozprofile/src/prefreader.rs
testing/mozbase/rust/mozprofile/src/profile.rs
--- a/testing/mozbase/rust/mozprofile/src/lib.rs
+++ b/testing/mozbase/rust/mozprofile/src/lib.rs
@@ -3,19 +3,19 @@ extern crate tempdir;
 pub mod preferences;
 pub mod prefreader;
 pub mod profile;
 
 #[cfg(test)]
 mod test {
     //    use std::fs::File;
     //    use profile::Profile;
-    use preferences::Pref;
-    use prefreader::{parse, serialize, tokenize};
-    use prefreader::{Position, PrefToken};
+    use crate::preferences::Pref;
+    use crate::prefreader::{parse, serialize, tokenize};
+    use crate::prefreader::{Position, PrefToken};
     use std::collections::BTreeMap;
     use std::error::Error;
     use std::io::Cursor;
     use std::str;
 
     #[test]
     fn tokenize_simple() {
         let prefs = "  user_pref ( 'example.pref.string', 'value' )   ;\n \
--- a/testing/mozbase/rust/mozprofile/src/prefreader.rs
+++ b/testing/mozbase/rust/mozprofile/src/prefreader.rs
@@ -1,9 +1,9 @@
-use preferences::{Pref, PrefValue, Preferences};
+use crate::preferences::{Pref, PrefValue, Preferences};
 use std::borrow::Borrow;
 use std::borrow::Cow;
 use std::char;
 use std::error::Error;
 use std::fmt;
 use std::io::{self, Write};
 use std::iter::Iterator;
 use std::mem;
--- a/testing/mozbase/rust/mozprofile/src/profile.rs
+++ b/testing/mozbase/rust/mozprofile/src/profile.rs
@@ -1,10 +1,10 @@
-use preferences::{Pref, Preferences};
-use prefreader::{parse, serialize, PrefReaderError};
+use crate::preferences::{Pref, Preferences};
+use crate::prefreader::{parse, serialize, PrefReaderError};
 use std::collections::btree_map::Iter;
 use std::fs::File;
 use std::io::prelude::*;
 use std::io::Result as IoResult;
 use std::path::{Path, PathBuf};
 use tempdir::TempDir;
 
 #[derive(Debug)]