From 8a28d627e457f9a6b61c67ec1d4ed12bf6eab63c Mon Sep 17 00:00:00 2001 From: Nick Groenen Date: Fri, 11 Dec 2020 14:52:59 +0100 Subject: [PATCH] Re-export vault_contents and WalkOptions as pub from crate root --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/lib.rs | 3 ++- src/walker.rs | 6 +++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0dd5b29..7795a8d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -291,7 +291,7 @@ dependencies = [ [[package]] name = "obsidian-export" -version = "0.1.0" +version = "0.2.0" dependencies = [ "eyre", "gumdrop", diff --git a/Cargo.toml b/Cargo.toml index 3a162a8..3bcfc0f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "obsidian-export" -version = "0.1.0" +version = "0.2.0" authors = ["Nick Groenen "] edition = "2018" license = "MIT OR Apache-2.0" diff --git a/src/lib.rs b/src/lib.rs index d36edf8..f409ded 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,6 +3,8 @@ extern crate lazy_static; mod walker; +pub use walker::{vault_contents, WalkOptions}; + use pathdiff::diff_paths; use percent_encoding::{utf8_percent_encode, AsciiSet, CONTROLS}; use pulldown_cmark::{CodeBlockKind, CowStr, Event, Options, Parser, Tag}; @@ -16,7 +18,6 @@ use std::io::prelude::*; use std::io::ErrorKind; use std::path::{Path, PathBuf}; use std::str; -use walker::{vault_contents, WalkOptions}; type Result = std::result::Result; type MarkdownTree<'a> = Vec>; diff --git a/src/walker.rs b/src/walker.rs index e724275..77bae4f 100644 --- a/src/walker.rs +++ b/src/walker.rs @@ -7,9 +7,9 @@ type Result = std::result::Result; #[derive(Debug, Clone, Copy)] pub struct WalkOptions<'a> { - ignore_filename: &'a str, - ignore_hidden: bool, - honor_gitignore: bool, + pub ignore_filename: &'a str, + pub ignore_hidden: bool, + pub honor_gitignore: bool, } impl<'a> WalkOptions<'a> {