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