refactor(tvix/eval): use write! macro instead of f.write_fmt
grfn pointed out in cl/6082 that this is actually the desugaring of the write! macro, so it doesn't make sense to write it out. Change-Id: If7c055b042ad22b034722aec1eaadba92736d684 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6180 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
parent
0a09356f82
commit
1d86c4537e
2 changed files with 7 additions and 8 deletions
|
|
@ -77,13 +77,13 @@ impl Display for NixAttrs {
|
|||
|
||||
match &self.0 {
|
||||
AttrsRep::KV { name, value } => {
|
||||
f.write_fmt(format_args!("name = {}; ", name))?;
|
||||
f.write_fmt(format_args!("value = {}; ", value))?;
|
||||
write!(f, "name = {}; ", name)?;
|
||||
write!(f, "value = {}; ", value)?;
|
||||
}
|
||||
|
||||
AttrsRep::Map(map) => {
|
||||
for (name, value) in map.iter() {
|
||||
f.write_fmt(format_args!("{} = {}; ", name.ident_str(), value))?;
|
||||
write!(f, "{} = {}; ", name.ident_str(), value)?;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue