These do not yet test nested attribute sets; we need to add some more inspection primitives first. Change-Id: Icfc99bf17c73ebefc0d882a84f0ca73ec688a54d Reviewed-on: https://cl.tvl.fyi/c/depot/+/6110 Reviewed-by: eta <tvl@eta.st> Tested-by: BuildkiteCI
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			471 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			471 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| use std::fmt::Display;
 | |
| 
 | |
| /// This module implements Nix language strings and their different
 | |
| /// backing implementations.
 | |
| 
 | |
| #[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
 | |
| pub struct NixString(pub String);
 | |
| 
 | |
| impl Display for NixString {
 | |
|     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 | |
|         f.write_str(self.0.as_str())
 | |
|     }
 | |
| }
 | |
| 
 | |
| impl From<&str> for NixString {
 | |
|     fn from(s: &str) -> Self {
 | |
|         NixString(s.to_string())
 | |
|     }
 | |
| }
 |