about summary refs log tree commit diff
path: root/rustc_tools_util/src
diff options
context:
space:
mode:
authorxFrednet <xFrednet@gmail.com>2022-12-15 12:42:08 +0100
committerxFrednet <xFrednet@gmail.com>2022-12-15 13:01:02 +0100
commit004b885c0afe34d6f8e6649f1faa8bbef656172c (patch)
treed0e7f6dfcbbe597a34c7f741f88728f6293281f6 /rustc_tools_util/src
parentaa66212e291cf6d726d58d139b7ab19631431bd5 (diff)
downloadrust-004b885c0afe34d6f8e6649f1faa8bbef656172c.tar.gz
rust-004b885c0afe34d6f8e6649f1faa8bbef656172c.zip
rustc_tools_util: changelog and 0.3.0 release
Diffstat (limited to 'rustc_tools_util/src')
-rw-r--r--rustc_tools_util/src/lib.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/rustc_tools_util/src/lib.rs b/rustc_tools_util/src/lib.rs
index 5e856319c88..4c1d8c3733d 100644
--- a/rustc_tools_util/src/lib.rs
+++ b/rustc_tools_util/src/lib.rs
@@ -1,7 +1,5 @@
 #![cfg_attr(feature = "deny-warnings", deny(warnings))]
 
-use std::env;
-
 /// This macro creates the version string during compilation from the
 /// current environment
 #[macro_export]
@@ -121,7 +119,7 @@ pub fn get_commit_date() -> Option<String> {
 
 #[must_use]
 pub fn get_channel() -> String {
-    match env::var("CFG_RELEASE_CHANNEL") {
+    match std::env::var("CFG_RELEASE_CHANNEL") {
         Ok(channel) => channel,
         Err(_) => {
             // if that failed, try to ask rustc -V, do some parsing and find out
@@ -156,8 +154,8 @@ mod test {
     fn test_struct_local() {
         let vi = get_version_info!();
         assert_eq!(vi.major, 0);
-        assert_eq!(vi.minor, 2);
-        assert_eq!(vi.patch, 1);
+        assert_eq!(vi.minor, 3);
+        assert_eq!(vi.patch, 0);
         assert_eq!(vi.crate_name, "rustc_tools_util");
         // hard to make positive tests for these since they will always change
         assert!(vi.commit_hash.is_none());
@@ -167,7 +165,7 @@ mod test {
     #[test]
     fn test_display_local() {
         let vi = get_version_info!();
-        assert_eq!(vi.to_string(), "rustc_tools_util 0.2.1");
+        assert_eq!(vi.to_string(), "rustc_tools_util 0.3.0");
     }
 
     #[test]
@@ -176,7 +174,7 @@ mod test {
         let s = format!("{vi:?}");
         assert_eq!(
             s,
-            "VersionInfo { crate_name: \"rustc_tools_util\", major: 0, minor: 2, patch: 1 }"
+            "VersionInfo { crate_name: \"rustc_tools_util\", major: 0, minor: 3, patch: 0 }"
         );
     }
 }