Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update nom requirement from 6.0 to 7.0 #10

Merged
merged 3 commits into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ include = [
"README.md",
]

[dependencies.nom]
version = "6.0"
default-features = false
[dependencies]
nom = "7.0"
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl CursorThemeIml {
continue;
}

let inherited_theme = CursorThemeIml::load(inherits, &search_paths);
let inherited_theme = CursorThemeIml::load(inherits, search_paths);

match inherited_theme.load_icon(icon_name, search_paths, walked_themes) {
Some(icon_path) => return Some(icon_path),
Expand Down
10 changes: 5 additions & 5 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use nom::number::complete as number;
use nom::IResult;

#[derive(Debug, Clone, Eq, PartialEq)]
struct TOC {
struct Toc {
toctype: u32,
subtype: u32,
pos: u32,
Expand Down Expand Up @@ -66,14 +66,14 @@ fn parse_header(i: &[u8]) -> IResult<&[u8], u32> {
Ok((i, ntoc))
}

fn parse_toc(i: &[u8]) -> IResult<&[u8], TOC> {
fn parse_toc(i: &[u8]) -> IResult<&[u8], Toc> {
let (i, toctype) = number::le_u32(i)?; // Type
let (i, subtype) = number::le_u32(i)?; // Subtype
let (i, pos) = number::le_u32(i)?; // Position

Ok((
i,
TOC {
Toc {
toctype,
subtype,
pos,
Expand Down Expand Up @@ -154,7 +154,7 @@ pub fn parse_xcursor(content: &[u8]) -> Option<Vec<Image>> {

#[cfg(test)]
mod tests {
use super::{parse_header, parse_toc, rgba_to_argb, TOC};
use super::{parse_header, parse_toc, rgba_to_argb, Toc};

// A sample (and simple) XCursor file generated with xcursorgen.
// Contains a single 4x4 image.
Expand All @@ -180,7 +180,7 @@ mod tests {

#[test]
fn test_parse_toc() {
let toc = TOC {
let toc = Toc {
toctype: 0xfffd0002,
subtype: 4,
pos: 0x1c,
Expand Down