]> git.lizzy.rs Git - rust.git/commitdiff
Apply suggestions from code review
authorJane Lusby <jlusby42@gmail.com>
Tue, 5 Oct 2021 22:09:11 +0000 (15:09 -0700)
committerGitHub <noreply@github.com>
Tue, 5 Oct 2021 22:09:11 +0000 (15:09 -0700)
library/std/src/process.rs
library/std/src/sys_common/process.rs

index 9b915c6e8e7eac747c7dc5f55943e8960e5f17c9..0be261cbd0b2d1f6d586fec97afeb78450c986e2 100644 (file)
 use crate::str;
 use crate::sys::pipe::{read2, AnonPipe};
 use crate::sys::process as imp;
-#[stable(feature = "command_access", since = "1.56.0")]
+#[stable(feature = "command_access", since = "1.57.0")]
 pub use crate::sys_common::process::CommandEnvs;
 use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
 
@@ -948,7 +948,7 @@ pub fn status(&mut self) -> io::Result<ExitStatus> {
     /// let cmd = Command::new("echo");
     /// assert_eq!(cmd.get_program(), "echo");
     /// ```
-    #[stable(feature = "command_access", since = "1.56.0")]
+    #[stable(feature = "command_access", since = "1.57.0")]
     pub fn get_program(&self) -> &OsStr {
         self.inner.get_program()
     }
@@ -970,7 +970,7 @@ pub fn get_program(&self) -> &OsStr {
     /// let args: Vec<&OsStr> = cmd.get_args().collect();
     /// assert_eq!(args, &["first", "second"]);
     /// ```
-    #[stable(feature = "command_access", since = "1.56.0")]
+    #[stable(feature = "command_access", since = "1.57.0")]
     pub fn get_args(&self) -> CommandArgs<'_> {
         CommandArgs { inner: self.inner.get_args() }
     }
@@ -1001,7 +1001,7 @@ pub fn get_args(&self) -> CommandArgs<'_> {
     ///     (OsStr::new("TZ"), None)
     /// ]);
     /// ```
-    #[stable(feature = "command_access", since = "1.56.0")]
+    #[stable(feature = "command_access", since = "1.57.0")]
     pub fn get_envs(&self) -> CommandEnvs<'_> {
         self.inner.get_envs()
     }
@@ -1021,7 +1021,7 @@ pub fn get_envs(&self) -> CommandEnvs<'_> {
     /// cmd.current_dir("/bin");
     /// assert_eq!(cmd.get_current_dir(), Some(Path::new("/bin")));
     /// ```
-    #[stable(feature = "command_access", since = "1.56.0")]
+    #[stable(feature = "command_access", since = "1.57.0")]
     pub fn get_current_dir(&self) -> Option<&Path> {
         self.inner.get_current_dir()
     }
@@ -1053,13 +1053,13 @@ fn as_inner_mut(&mut self) -> &mut imp::Command {
 ///
 /// This struct is created by [`Command::get_args`]. See its documentation for
 /// more.
-#[stable(feature = "command_access", since = "1.56.0")]
+#[stable(feature = "command_access", since = "1.57.0")]
 #[derive(Debug)]
 pub struct CommandArgs<'a> {
     inner: imp::CommandArgs<'a>,
 }
 
-#[stable(feature = "command_access", since = "1.56.0")]
+#[stable(feature = "command_access", since = "1.57.0")]
 impl<'a> Iterator for CommandArgs<'a> {
     type Item = &'a OsStr;
     fn next(&mut self) -> Option<&'a OsStr> {
@@ -1070,7 +1070,7 @@ fn size_hint(&self) -> (usize, Option<usize>) {
     }
 }
 
-#[stable(feature = "command_access", since = "1.56.0")]
+#[stable(feature = "command_access", since = "1.57.0")]
 impl<'a> ExactSizeIterator for CommandArgs<'a> {
     fn len(&self) -> usize {
         self.inner.len()
index 124f27d26409f78768612bb6df60fddb981738a7..3d71219756a207bfaba82d9a6a980ef102e6e338 100644 (file)
@@ -106,13 +106,13 @@ pub fn iter(&self) -> CommandEnvs<'_> {
 /// This struct is created by
 /// [`Command::get_envs`][crate::process::Command::get_envs]. See its
 /// documentation for more.
-#[stable(feature = "command_access", since = "1.56.0")]
+#[stable(feature = "command_access", since = "1.57.0")]
 #[derive(Debug)]
 pub struct CommandEnvs<'a> {
     iter: crate::collections::btree_map::Iter<'a, EnvKey, Option<OsString>>,
 }
 
-#[stable(feature = "command_access", since = "1.56.0")]
+#[stable(feature = "command_access", since = "1.57.0")]
 impl<'a> Iterator for CommandEnvs<'a> {
     type Item = (&'a OsStr, Option<&'a OsStr>);
     fn next(&mut self) -> Option<Self::Item> {
@@ -123,7 +123,7 @@ fn size_hint(&self) -> (usize, Option<usize>) {
     }
 }
 
-#[stable(feature = "command_access", since = "1.56.0")]
+#[stable(feature = "command_access", since = "1.57.0")]
 impl<'a> ExactSizeIterator for CommandEnvs<'a> {
     fn len(&self) -> usize {
         self.iter.len()