Skip to content

Commit

Permalink
Fix new warnings on Nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
simonask committed Feb 24, 2024
1 parent 092bf82 commit abe9316
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
2 changes: 0 additions & 2 deletions src/emitter.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use std::collections::VecDeque;

use alloc::string::String;

use crate::macros::{
is_alpha, is_ascii, is_blank, is_blankz, is_bom, is_break, is_breakz, is_printable, is_space,
};
Expand Down
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ pub enum MappingStyle {

#[cfg(test)]
mod tests {
use alloc::vec::Vec;

use super::*;

#[test]
Expand Down
15 changes: 15 additions & 0 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,18 @@ macro_rules! IS_BLANKZ {
IS_BLANKZ_AT!($string, 0)
};
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn printable() {
for ch in "🎉".chars() {
assert!(is_printable(ch));
}
for ch in "\u{1f389}".chars() {
assert!(is_printable(ch));
}
}
}
3 changes: 0 additions & 3 deletions src/parser.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
use alloc::string::String;
use alloc::{vec, vec::Vec};

use crate::scanner::Scanner;
use crate::{
Encoding, Error, Event, EventData, MappingStyle, Mark, Result, ScalarStyle, SequenceStyle,
Expand Down
2 changes: 0 additions & 2 deletions src/scanner.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use std::collections::VecDeque;

use alloc::string::String;

use crate::macros::{is_blankz, is_break};
use crate::reader::yaml_parser_update_buffer;
use crate::{
Expand Down

0 comments on commit abe9316

Please sign in to comment.