Skip to content

Commit

Permalink
chore(deps): update nom requirement from 6.0 to 7.0 (#10)
Browse files Browse the repository at this point in the history
* chore(deps): update nom requirement from 6.0 to 7.0

Updates the requirements on [nom](https://github.com/Geal/nom) to permit the latest version.
- [Release notes](https://github.com/Geal/nom/releases)
- [Changelog](https://github.com/Geal/nom/blob/master/CHANGELOG.md)
- [Commits](rust-bakery/nom@6.0.0...7.0.0)

---
updated-dependencies:
- dependency-name: nom
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Remove `default-features = false` from nom

* Appease clippy

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: esposm03 <36164633+esposm03@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and esposm03 authored Aug 23, 2021
1 parent 0e16996 commit 9fa4fcd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
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

0 comments on commit 9fa4fcd

Please sign in to comment.