mirror of https://github.com/zkat/miette.git
fix more msrv issues
This commit is contained in:
parent
e0d6d4e186
commit
190e383868
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue