using classify()

This commit is contained in:
Jeroen Vannevel 2022-01-10 18:19:37 +00:00
parent 6a1b4912bf
commit 9252c76255
No known key found for this signature in database
GPG key ID: 78EF5F52F38C49BD

View file

@ -1,6 +1,5 @@
use std::iter::successors;
use hir::{TypeInfo, HirDisplay};
use hir::TypeInfo;
use itertools::Itertools;
use syntax::{
algo::neighbor,
@ -282,9 +281,9 @@ fn main() {
merge_match_arms,
r#"//- minicore: result
fn func() {
match Result::<i32, f32>::Ok(0) {
Ok(x) => $0x.to_string(),
Err(x) => x.to_string()
match Result::<f64, f32>::Ok(0f64) {
Ok(x) => $0x.classify(),
Err(x) => x.classify()
};
}
"#,
@ -293,8 +292,8 @@ fn func() {
}
// fn func() {
// match Result::<i32, f32>::Ok(0) {
// Ok(x) => x.to_string(),
// Err(x) => x.to_string()
// match Result::<f64, f32>::Ok(0f64) {
// Ok(x) => x.classify(),
// Err(x) => x.classify()
// };
// }