Skip to content

Commit

Permalink
error fix
Browse files Browse the repository at this point in the history
- added print again
- fixed jump-kun-macros
  • Loading branch information
TakaakiFuruse committed Dec 14, 2019
1 parent f4ba4d5 commit 8fa0620
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ name = "jump-kun"
path = "src/main.rs"

[dependencies]
jump-kun-macros={version = "0.1.0", path = "jump-kun-macros"}
jump-kun-macros={version = "0.1.1", path = "jump-kun-macros"}
walkdir= "2.2.9"
skim = "0.6.9"
serde_json= "1.0.44"
Expand Down
2 changes: 1 addition & 1 deletion config-sample/config.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
order="CurrentDir,ParentDir,ChildDir,VisitedDir,NotSure"
order="CurrentDir,ParentDir,ChildDir,VisitedDir,NotSure,Invalid"
2 changes: 1 addition & 1 deletion jump-kun-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "jump-kun-macros"
version = "0.1.0"
version = "0.1.1"
authors = ["TakaakiFuruse <[email protected]>"]
edition = "2018"
description = "A crate for jump-kun. Parses jump-kun config file and creates fucntions."
Expand Down
8 changes: 7 additions & 1 deletion jump-kun-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ pub fn order_builder(item: TokenStream) -> TokenStream {

let orders: Vec<&str> = order_config.split(",").collect();

assert_eq!(&orders.len(), enum_len);
assert_eq!(
&orders.len(),
enum_len,
"orders: {:#?}, enum_variants: {:#?}",
orders,
enum_variants
);

let enum_fields = orders.iter().enumerate().map(|(i, elm)| {
let elm_ident = syn::Ident::new(&elm, name.span());
Expand Down
1 change: 1 addition & 0 deletions src/jump_then_add_to_hist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::str;
pub fn jump_then_add_to_hist(item: String, path: &str) {
if !item.is_empty() {
let tree = Db::open(path).unwrap();
print!("{}", &item);
let new_visited_dir = Dir::new_visited(PathBuf::from(&item));
let insertion = match tree.update_and_fetch(&item.as_bytes(), update) {
Ok(v) => match v {
Expand Down

0 comments on commit 8fa0620

Please sign in to comment.