fix(tvix/eval): don't impl From<NixString> for String
This caught me by accident in an earlier revision of cl/11500 - I had a `NixString`, wanted to return it as a `String`, so I was naively calling `s.into()`. That unfortunately gave me the `Display` implementation of `NixString`, which quotes strings, causing an annoying error further up the stack. NixStrings are bytes, we can keep the impl From<NixString> for BString, but having a `.into()` suddenly do quoting is more than unexpected. Change-Id: I5434ba94bfe6c493d0a57e68225ecc22daa4b948 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11505 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
This commit is contained in:
		
							parent
							
								
									6d79cf39b9
								
							
						
					
					
						commit
						ff9e8743f6
					
				
					 1 changed files with 1 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -530,11 +530,7 @@ impl<'a> From<&'a NixString> for &'a BStr {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
impl From<NixString> for String {
 | 
			
		||||
    fn from(s: NixString) -> Self {
 | 
			
		||||
        s.to_string()
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
// No impl From<NixString> for String, that one quotes.
 | 
			
		||||
 | 
			
		||||
impl From<NixString> for BString {
 | 
			
		||||
    fn from(s: NixString) -> Self {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue