Re-export vault_contents and WalkOptions as pub from crate root

This commit is contained in:
Nick Groenen 2020-12-11 14:52:59 +01:00
parent 466bc28485
commit 8a28d627e4
No known key found for this signature in database
GPG Key ID: 4F0AD019928AE098
4 changed files with 7 additions and 6 deletions

2
Cargo.lock generated
View File

@ -291,7 +291,7 @@ dependencies = [
[[package]] [[package]]
name = "obsidian-export" name = "obsidian-export"
version = "0.1.0" version = "0.2.0"
dependencies = [ dependencies = [
"eyre", "eyre",
"gumdrop", "gumdrop",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "obsidian-export" name = "obsidian-export"
version = "0.1.0" version = "0.2.0"
authors = ["Nick Groenen <nick@groenen.me>"] authors = ["Nick Groenen <nick@groenen.me>"]
edition = "2018" edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"

View File

@ -3,6 +3,8 @@ extern crate lazy_static;
mod walker; mod walker;
pub use walker::{vault_contents, WalkOptions};
use pathdiff::diff_paths; use pathdiff::diff_paths;
use percent_encoding::{utf8_percent_encode, AsciiSet, CONTROLS}; use percent_encoding::{utf8_percent_encode, AsciiSet, CONTROLS};
use pulldown_cmark::{CodeBlockKind, CowStr, Event, Options, Parser, Tag}; use pulldown_cmark::{CodeBlockKind, CowStr, Event, Options, Parser, Tag};
@ -16,7 +18,6 @@ use std::io::prelude::*;
use std::io::ErrorKind; use std::io::ErrorKind;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::str; use std::str;
use walker::{vault_contents, WalkOptions};
type Result<T, E = ExportError> = std::result::Result<T, E>; type Result<T, E = ExportError> = std::result::Result<T, E>;
type MarkdownTree<'a> = Vec<Event<'a>>; type MarkdownTree<'a> = Vec<Event<'a>>;

View File

@ -7,9 +7,9 @@ type Result<T, E = ExportError> = std::result::Result<T, E>;
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy)]
pub struct WalkOptions<'a> { pub struct WalkOptions<'a> {
ignore_filename: &'a str, pub ignore_filename: &'a str,
ignore_hidden: bool, pub ignore_hidden: bool,
honor_gitignore: bool, pub honor_gitignore: bool,
} }
impl<'a> WalkOptions<'a> { impl<'a> WalkOptions<'a> {