File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -236,21 +236,14 @@ fn _var(key: &OsStr) -> Result<String, VarError> {
236236} 
237237
238238/// Fetches the environment variable `key` from the current process, returning 
239- /// [`None`] if the variable isn't set or there's  another error. 
239+ /// [`None`] if the variable isn't set or if  there is  another error. 
240240/// 
241- /// Note that the method will not check if the environment variable 
242- /// is valid Unicode. If you want to have an error on invalid UTF-8, 
243- /// use the [`var`] function instead. 
244- /// 
245- /// # Errors 
246- /// 
247- /// This function returns an error if the environment variable isn't set. 
248- /// 
249- /// This function may return an error if the environment variable's name contains 
241+ /// It may return `None` if the environment variable's name contains 
250242/// the equal sign character (`=`) or the NUL character. 
251243/// 
252- /// This function may return an error if the environment variable's value contains 
253- /// the NUL character. 
244+ /// Note that this function will not check if the environment variable 
245+ /// is valid Unicode. If you want to have an error on invalid UTF-8, 
246+ /// use the [`var`] function instead. 
254247/// 
255248/// # Examples 
256249/// 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments