1
Fork 0

annotate-snippets: update to 0.10

This commit is contained in:
klensy 2023-12-30 18:11:41 +03:00
parent 5cb2e7dfc3
commit 5b153b52a2
5 changed files with 24 additions and 23 deletions

View file

@ -1,7 +1,4 @@
use annotate_snippets::{
display_list::DisplayList,
snippet::{Annotation, AnnotationType, Slice, Snippet, SourceAnnotation},
};
use annotate_snippets::{Annotation, AnnotationType, Renderer, Slice, Snippet, SourceAnnotation};
use fluent_bundle::{FluentBundle, FluentError, FluentResource};
use fluent_syntax::{
ast::{
@ -179,10 +176,9 @@ pub(crate) fn fluent_messages(input: proc_macro::TokenStream) -> proc_macro::Tok
range: (pos.start, pos.end - 1),
}],
}],
opt: Default::default(),
};
let dl = DisplayList::from(snippet);
eprintln!("{dl}\n");
let renderer = Renderer::plain();
eprintln!("{}\n", renderer.render(snippet));
}
return failed(&crate_name);