summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2017-02-05 16:20:25 +0100
committerGitHub <noreply@github.com>2017-02-05 16:20:25 +0100
commit3ffedec8b8d3c785166021543ff69c15c246632c (patch)
tree45636b086322b5611f9d6392bbe7aecf80fded3b
parent63ffbf62de95dfed62d3c41588472c3c8056a5a6 (diff)
parent0180aa9a6155a908ee9c0efcf8459b63691543f8 (diff)
downloadimag-3ffedec8b8d3c785166021543ff69c15c246632c.zip
imag-3ffedec8b8d3c785166021543ff69c15c246632c.tar.gz
Merge pull request #892 from matthiasbeyer/remove-warnings
Remove warnings
-rw-r--r--libimagentrymarkdown/src/html.rs4
-rw-r--r--libimagentrymarkdown/src/link.rs2
-rw-r--r--libimagerror/src/error_gen.rs1
-rw-r--r--libimagref/src/reference.rs8
4 files changed, 8 insertions, 7 deletions
diff --git a/libimagentrymarkdown/src/html.rs b/libimagentrymarkdown/src/html.rs
index e0a7b8b..1fcd12c 100644
--- a/libimagentrymarkdown/src/html.rs
+++ b/libimagentrymarkdown/src/html.rs
@@ -49,7 +49,7 @@ pub mod iter {
impl<I: Iterator<Item = Entry>> ToHtmlIterator<I> {
- fn new(i: I) -> ToHtmlIterator<I> {
+ pub fn new(i: I) -> ToHtmlIterator<I> {
ToHtmlIterator { i: i }
}
@@ -80,7 +80,7 @@ pub mod iter {
impl<I: Iterator<Item = Entry>> WithHtmlIterator<I> {
- fn new(i: I) -> WithHtmlIterator<I> {
+ pub fn new(i: I) -> WithHtmlIterator<I> {
WithHtmlIterator { i: i }
}
diff --git a/libimagentrymarkdown/src/link.rs b/libimagentrymarkdown/src/link.rs
index 267ef34..9f13fe6 100644
--- a/libimagentrymarkdown/src/link.rs
+++ b/libimagentrymarkdown/src/link.rs
@@ -36,7 +36,7 @@ pub struct Link {
impl Link {
/// Translate a `Link` into a `UrlLink`
- fn into_urllink(self) -> Result<UrlLink> {
+ pub fn into_urllink(self) -> Result<UrlLink> {
Url::parse(&self.link[..])
.map(move |link| UrlLink { title: self.title, link: link, })
.map_err(Box::new)
diff --git a/libimagerror/src/error_gen.rs b/libimagerror/src/error_gen.rs
index 38cb159..7a9fc18 100644
--- a/libimagerror/src/error_gen.rs
+++ b/libimagerror/src/error_gen.rs
@@ -226,6 +226,7 @@ macro_rules! generate_error_types {
#[cfg(test)]
+#[allow(dead_code)]
mod test {
generate_error_module!(
diff --git a/libimagref/src/reference.rs b/libimagref/src/reference.rs
index 1b307ba..e860452 100644
--- a/libimagref/src/reference.rs
+++ b/libimagref/src/reference.rs
@@ -137,22 +137,22 @@ impl<'a> Ref<'a> {
None
};
- Ok((file, opt_contenthash, opt_permissions))
+ Ok((opt_contenthash, opt_permissions))
})
// and then we try to canonicalize the PathBuf, because we want to store a
// canonicalized path
// and return (file, content hash, permissions, canonicalized path)
- .and_then(|(file, opt_contenthash, opt_permissions)| {
+ .and_then(|(opt_contenthash, opt_permissions)| {
pb.canonicalize()
- .map(|can| (file, opt_contenthash, opt_permissions, can))
+ .map(|can| (opt_contenthash, opt_permissions, can))
// if PathBuf::canonicalize() failed, build an error from the return value
.map_err(|e| REK::PathCanonicalizationError.into_error_with_cause(Box::new(e)))
})
// and then we hash the canonicalized path
// and return (file, content hash, permissions, canonicalized path, path hash)
- .and_then(|(file, opt_contenthash, opt_permissions, can)| {
+ .and_then(|(opt_contenthash, opt_permissions, can)| {
let path_hash = try!(Ref::hash_path(&can)
.map_err(Box::new)
.map_err(|e| REK::PathHashingError.into_error_with_cause(e))