fix more msrv issues

This commit is contained in:
Aria Beingessner 2023-03-28 15:10:18 -04:00
parent e0d6d4e186
commit 190e383868
1 changed files with 3 additions and 3 deletions

View File

@ -155,7 +155,7 @@ impl Diagnostic {
#[test] #[test]
fn emit() { fn emit() {
use std::fs::File; use std::fs::OpenOptions;
use std::io::BufWriter; use std::io::BufWriter;
use std::io::Write; use std::io::Write;
use std::path::PathBuf; use std::path::PathBuf;
@ -167,12 +167,12 @@ fn emit() {
// works ok. // works ok.
let root = std::env!("CARGO_MANIFEST_DIR"); let root = std::env!("CARGO_MANIFEST_DIR");
let schema = PathBuf::from(root).join("miette-json-schema.json"); let schema = PathBuf::from(root).join("miette-json-schema.json");
let file = File::options() let file = OpenOptions::new()
.create(true) .create(true)
.write(true) .write(true)
.truncate(true) .truncate(true)
.open(schema) .open(schema)
.unwrap(); .unwrap();
let mut file = BufWriter::new(file); let mut file = BufWriter::new(file);
writeln!(&mut file, "{json_schema}").unwrap(); writeln!(&mut file, "{}", json_schema).unwrap();
} }