Skip to content

Commit 073ada9

Browse files
committed
Adds missing Debug derives
1 parent a491ea9 commit 073ada9

File tree

7 files changed

+10
-8
lines changed

7 files changed

+10
-8
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pnp"
3-
version = "0.7.0"
3+
version = "0.7.1"
44
edition = "2021"
55
license = "BSD-2-Clause"
66
description = "Resolution primitives for Yarn PnP"

src/fs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ where Storage: AsRef<[u8]> + Send + Sync {
106106
fn read_to_string<P: AsRef<Path>, S: AsRef<str>>(&self, zip_path: P, sub: S) -> Result<String, std::io::Error>;
107107
}
108108

109+
#[derive(Debug)]
109110
pub struct LruZipCache<Storage>
110111
where Storage: AsRef<[u8]> + Send + Sync {
111112
lru: concurrent_lru::sharded::LruCache<PathBuf, Zip<Storage>>,

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ pub struct PackageInformation {
121121
}
122122

123123
#[serde_as]
124-
#[derive(Clone, Deserialize)]
124+
#[derive(Clone, Debug, Deserialize)]
125125
#[serde(rename_all = "camelCase")]
126126
pub struct Manifest {
127127
#[serde(skip_deserializing)]

src/lib_tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ mod tests {
4545
);
4646

4747
match resolution {
48-
Ok(Resolution::Package(path, subpath)) => {
48+
Ok(Resolution::Package(_path, _subpath)) => {
4949
// path = "/path/to/lodash.zip"
5050
// subpath = "cloneDeep"
5151
},
52-
Ok(Resolution::Specifier(specifier)) => {
52+
Ok(Resolution::Specifier(_specifier)) => {
5353
// This is returned when the PnP resolver decides that it shouldn't
5454
// handle the resolution for this particular specifier. In that case,
5555
// the specifier should be forwarded to the default resolver.
5656
},
57-
Err(err) => {
57+
Err(_err) => {
5858
// An error happened during the resolution. Falling back to the default
5959
// resolver isn't recommended.
6060
},

src/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use fancy_regex::Regex;
22
use serde::{de::Error, Deserialize, Deserializer};
3-
use std::{borrow::Cow};
3+
use std::borrow::Cow;
44

55
fn strip_slash_escape(str: &str) -> String {
66
let mut res = String::default();
@@ -26,7 +26,7 @@ fn strip_slash_escape(str: &str) -> String {
2626
res
2727
}
2828

29-
#[derive(Clone)]
29+
#[derive(Clone, Debug)]
3030
pub struct RegexDef(pub Regex);
3131

3232
impl<'de> Deserialize<'de> for RegexDef {

src/zip.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pub struct Entry {
1717
pub size: usize,
1818
}
1919

20+
#[derive(Debug)]
2021
pub struct Zip<T> where T : AsRef<[u8]> {
2122
storage: T,
2223
pub files: HashMap<String, Entry>,

0 commit comments

Comments
 (0)