Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
0022a36
chore: update changelog
mendelsshop Sep 30, 2022
4e81261
startedcwit python support
mendelsshop Sep 30, 2022
0b54d49
chore: update changelog
mendelsshop Sep 30, 2022
721ea9d
TODO:
mendelsshop Sep 30, 2022
21509e8
chore: update changelog
mendelsshop Sep 30, 2022
5b37022
so chnagelog commit dont get pushed into the changlog
mendelsshop Oct 2, 2022
efb030c
update changelog
mendelsshop Oct 2, 2022
3e726b3
lib:
mendelsshop Oct 2, 2022
a2c14a1
update changelog
mendelsshop Oct 2, 2022
b37aa91
testing python
mendelsshop Oct 2, 2022
f60ef00
whyu
mendelsshop Oct 2, 2022
ce8cddb
lib:
mendelsshop Oct 2, 2022
5df85be
update changelog
mendelsshop Oct 2, 2022
04d4403
blah blah
mendelsshop Oct 3, 2022
bd8bfc7
more messing with testing
mendelsshop Oct 3, 2022
d15e50b
more messings
mendelsshop Oct 3, 2022
279479d
maybe mssing in wrong spot
mendelsshop Oct 3, 2022
b5d626a
more messibng
mendelsshop Oct 3, 2022
9a45620
df
mendelsshop Oct 3, 2022
eb2cfa0
shoulkd just move this file to ints own repo
mendelsshop Oct 3, 2022
59b222e
more testing
mendelsshop Oct 3, 2022
b57600f
lib:
mendelsshop Oct 3, 2022
5c6e57a
update changelog
mendelsshop Oct 3, 2022
986f47c
cargo fmted and clipped the last commit.
mendelsshop Oct 3, 2022
e2ef805
Merge branch 'other_language_support' of https://github.com/mendelssh…
mendelsshop Oct 3, 2022
a9dc284
lib:
mendelsshop Oct 3, 2022
a22e03f
update changelog
mendelsshop Oct 3, 2022
8212ae6
lib:
mendelsshop Oct 4, 2022
254eb78
update changelog
mendelsshop Oct 4, 2022
8bb603b
working on c parsing
mendelsshop Oct 4, 2022
15f2c36
realized c-lang support is comlicated, it will be an optinal feature
mendelsshop Oct 6, 2022
099044c
shortened some code in lib
mendelsshop Oct 6, 2022
94d0049
partialy not working b/c enum_dispatch can't figure it out
mendelsshop Oct 7, 2022
a3373f1
pushing this mess just to save it
mendelsshop Oct 7, 2022
a7adde1
back to normal for now
mendelsshop Oct 7, 2022
45f07a8
made working idea based on what i failed to do before by making funct…
mendelsshop Oct 9, 2022
a6a323d
my idead actualy works just needec to cleanup add c support and docum…
mendelsshop Oct 9, 2022
013291e
rm not-needed.txt
mendelsshop Oct 9, 2022
d098bba
not using that
mendelsshop Oct 12, 2022
4ff8aa8
Merge branch 'other_language_support' of https://github.com/mendelssh…
mendelsshop Oct 12, 2022
0c8e93c
added soe more tests parsing a single commit takes one second, parsin…
mendelsshop Oct 12, 2022
5304988
made tests more sstem indepndnt
mendelsshop Oct 12, 2022
e8c56f2
buum[pped ra_ap syntax version more
mendelsshop Oct 12, 2022
6467f6e
idk
mendelsshop Oct 12, 2022
31b2e2b
started workig in macro for get_function_history
mendelsshop Oct 12, 2022
36d998a
cliipied + fmted last commit
mendelsshop Oct 12, 2022
f57a02e
macro now works fine, like i like it
mendelsshop Oct 12, 2022
5724d9c
messily fixed macro scoping
mendelsshop Oct 13, 2022
6da25f1
gui:
mendelsshop Oct 13, 2022
813867c
update changelog
mendelsshop Oct 13, 2022
390b7d7
started working on more lagnuages
mendelsshop Oct 14, 2022
d58c939
not on by deafault
mendelsshop Oct 14, 2022
669d7e1
sprinkling some inlines
mendelsshop Oct 14, 2022
1051747
fixed bug whetere fromatwithcontext was being fed the wrong data, als…
mendelsshop Oct 14, 2022
398d32d
go function partialy working with unstable
mendelsshop Oct 14, 2022
88e6a84
go function cant have parents
mendelsshop Oct 19, 2022
c21ae7a
go support is mostly done
mendelsshop Oct 19, 2022
b1800d0
cargo fmted
mendelsshop Oct 19, 2022
446e7ff
added go test fixed go formating
mendelsshop Oct 19, 2022
17299d8
intial ruby support still a lot of todos
mendelsshop Oct 20, 2022
24d2135
ruby function can now get function arguments, and ruby classes can ge…
mendelsshop Oct 20, 2022
d1b4b74
added line numbers to ruby functions
mendelsshop Oct 20, 2022
7b049dc
did some more stuff
mendelsshop Oct 20, 2022
58cabc0
rubby can now get class bottom
mendelsshop Oct 20, 2022
7d5ddfe
updated workflows for multi langs support
mendelsshop Oct 20, 2022
c5fab02
updated dependcies
mendelsshop Oct 20, 2022
0896a27
attempting ot fix gh actions
mendelsshop Oct 20, 2022
c13004c
started working on ruby class signatures
mendelsshop Oct 20, 2022
42d8566
started java support
mendelsshop Oct 20, 2022
24a5339
nothing speacial
mendelsshop Oct 21, 2022
32632b5
more condintional compilation
mendelsshop Oct 23, 2022
64349bf
removed some places where code could panic, cleaned up a drop
mendelsshop Oct 23, 2022
f8bfc83
more javas stuff
mendelsshop Oct 23, 2022
02a3b19
Merge branch 'other_language_support' of https://github.com/mendelssh…
mendelsshop Oct 23, 2022
ef7b470
renamed some filters, and made some filters work better
mendelsshop Oct 23, 2022
37bbb53
fixed some optinal stuff
mendelsshop Oct 23, 2022
fd06e33
tui: shortend filter loc
mendelsshop Oct 24, 2022
5fc408c
update changelog
mendelsshop Oct 24, 2022
08645b7
tui:
mendelsshop Oct 24, 2022
2c92554
update changelog
mendelsshop Oct 24, 2022
8a8ea83
docs
mendelsshop Oct 24, 2022
1db0793
tui: added more filters
mendelsshop Oct 24, 2022
b75b240
reograganized imports/clezned up
mendelsshop Oct 24, 2022
e1305ce
added doc comment filters for rust
mendelsshop Oct 24, 2022
a4ea11d
update changelog
mendelsshop Oct 25, 2022
fff74d3
more java stuff
mendelsshop Oct 26, 2022
ed6fafe
idk what im doing but we can now semi find methods in java
mendelsshop Oct 27, 2022
da1fbfd
fix bug where if python function was last piece of code it wouldn't b…
mendelsshop Oct 27, 2022
368533b
more java ideas
mendelsshop Oct 27, 2022
866983d
working on a filter macro [broken]
mendelsshop Oct 27, 2022
e75d3bb
lib: fixed bug where I didnt understand how cfg-if works, also filter…
mendelsshop Oct 28, 2022
e4c4d9c
update changelog
mendelsshop Oct 28, 2022
93672a5
cargo clippied last commit
mendelsshop Oct 28, 2022
897f527
Merge branch 'other_language_support' of https://github.com/mendelssh…
mendelsshop Oct 28, 2022
de19561
added some more specific error messages
mendelsshop Oct 30, 2022
906eac3
printing new error messages in tests
mendelsshop Oct 30, 2022
12a428a
did some more java support nothing changed but maybee a bit closer an…
mendelsshop Oct 30, 2022
b2a3f44
go added more filters for parameters , ruby added filter for superclass
mendelsshop Oct 31, 2022
499510a
added a wak ton more filters also renamed other ones
mendelsshop Oct 31, 2022
52178e2
playing around memoization
mendelsshop Oct 31, 2022
48c680a
added caching feature fixed some cfg features being misspelled
mendelsshop Nov 2, 2022
ddb7456
removing c support (for now)
mendelsshop Nov 2, 2022
9e634e7
pushing towards release
mendelsshop Nov 2, 2022
26131ea
ideas comments etc
mendelsshop Nov 3, 2022
3590683
gui: started working on clickable dates/commits using list
mendelsshop Nov 4, 2022
9253b11
update changelog
mendelsshop Nov 4, 2022
7fd2988
removed/turned unwraps into expects
mendelsshop Nov 4, 2022
6046b3d
fixed bug where rayon was trying to be imported when parelel feature …
mendelsshop Nov 6, 2022
3e5fafd
updateing markdownstuffs
mendelsshop Nov 6, 2022
3045812
bumped gosyn version
mendelsshop Nov 7, 2022
199e49a
started working on using gitoxide very messy/hacky right now
mendelsshop Nov 8, 2022
32e7f9c
most things working fixed go stuff neeed to remove unwraps and other …
mendelsshop Nov 9, 2022
79c13a0
removed arc/mutexs and sneder recievers make go faster could be opmiz…
mendelsshop Nov 9, 2022
54cda84
removed a lot of unwraps and other panicking code and mmore todos
mendelsshop Nov 9, 2022
4865722
made cache deafault fixed bugs when not using paralel
mendelsshop Nov 9, 2022
da7ef2c
making lib go faster
mendelsshop Nov 10, 2022
948d2f8
removing useless no-parelel feature flag
mendelsshop Nov 10, 2022
475e064
stopped hardcoding language in gui
mendelsshop Nov 10, 2022
98f6af8
almost done reimplemtning using gitoxide
mendelsshop Nov 10, 2022
4281ba3
date filter works, now just need to do other filter vaildation and th…
mendelsshop Nov 10, 2022
60a4359
update workflows for no c_lang
mendelsshop Nov 11, 2022
6b8bfac
debbbuging why date range no work in ci
mendelsshop Nov 11, 2022
8678985
ooops this too
mendelsshop Nov 11, 2022
0b3aaec
added filter validation just going to see if theres any other problem…
mendelsshop Nov 11, 2022
8774d41
fixed not_rust_file test
mendelsshop Nov 11, 2022
9856e51
I think werer ready to merge back into other_languge_support
mendelsshop Nov 11, 2022
36573ee
made a function that gets git info instead of having one for commits …
mendelsshop Nov 11, 2022
a798866
Merge pull request #10 from mendelsshop/gitoxide
mendelsshop Nov 12, 2022
8ee0577
switching to using locatation.End_line and stop using mem::swap to sa…
mendelsshop Nov 13, 2022
787e75a
more stuff
mendelsshop Nov 14, 2022
b8b1d33
working on parent functions and classes (python)
mendelsshop Nov 14, 2022
1b976ec
moving along code is kinda cleaner (mostly refactor)
mendelsshop Nov 15, 2022
0d33a97
removed most panicking code from python.rs
mendelsshop Nov 15, 2022
e56eeda
made python args have more info such as type of arg and type
mendelsshop Nov 16, 2022
c853456
wip fixinf formating
mendelsshop Nov 16, 2022
7a5f918
fixed ruby formating (i think)
mendelsshop Nov 16, 2022
9217dd1
stiill atempting to fix rust formating, and getting the bottoms of cl…
mendelsshop Nov 17, 2022
b8839b1
ideas on why stuff could be broken
mendelsshop Nov 17, 2022
9c8b6a8
made examples/tests all compile/run
mendelsshop Nov 17, 2022
6a4d9a1
using turn into index/get into index fixes part of rust problem, remo…
mendelsshop Nov 17, 2022
6594da1
IT ACTUALLY WORKS!!!! (wasnt menat to be in caps)
mendelsshop Nov 17, 2022
e8c751f
idk what iwas trying to do but i think fixed some stuff
mendelsshop Nov 18, 2022
c648d98
updated dependncies
mendelsshop Nov 22, 2022
7d5e82e
update changelog
mendelsshop Nov 22, 2022
2984fe3
did a lot of clean + let..else etc
mendelsshop Nov 24, 2022
ce0961c
update changelog
mendelsshop Nov 24, 2022
f22dff5
useing new logger macro
mendelsshop Dec 2, 2022
b2577f2
removed some potentially panicking code, more to come
mendelsshop Dec 2, 2022
6a324aa
updated dependencies, clippied + fmted
mendelsshop Dec 12, 2022
c615f05
removed some more potential panics from indexing
mendelsshop Dec 13, 2022
e23d081
msrv workflow
mendelsshop Dec 13, 2022
021667e
part of it
mendelsshop Dec 13, 2022
e0df50b
needs version
mendelsshop Dec 13, 2022
734f947
Update MSRV badge [Skip CI]
github-actions[bot] Dec 13, 2022
30ab7b1
testing 123.....
mendelsshop Dec 13, 2022
d90a4a0
wrong path in actioon
mendelsshop Dec 13, 2022
b78a45e
Update MSRV badge [Skip CI]
github-actions[bot] Dec 13, 2022
80e572e
added msrv badges, should update cargo.tom too
mendelsshop Dec 13, 2022
1b1ef35
update msrv in cargo.toml
mendelsshop Dec 13, 2022
253b54a
plz work
github-actions[bot] Dec 13, 2022
9867644
Update MSRV badge [Skip CI]
github-actions[bot] Dec 13, 2022
10e4e78
removed some allows for lints
github-actions[bot] Dec 14, 2022
cae32fe
lib:
github-actions[bot] Dec 15, 2022
de93e44
ideas
github-actions[bot] Dec 15, 2022
d267b42
ruby ideas
github-actions[bot] Dec 16, 2022
1721d50
ruby now uses its own custom param data type
github-actions[bot] Dec 19, 2022
f204bf4
ruby functions support multiple classes now
github-actions[bot] Dec 19, 2022
d36a917
using threadsaferepository so no longer having to sue discover for ea…
github-actions[bot] Dec 20, 2022
bd7ae0e
udpated dependcies & readme
github-actions[bot] Dec 20, 2022
3dee1b6
fixed ruby identation
github-actions[bot] Dec 21, 2022
2fbc458
update changelog
mendelsshop Dec 21, 2022
f381833
added documentaion merging into other-lang-support
github-actions[bot] Dec 22, 2022
608941d
added mmore docs
github-actions[bot] Dec 22, 2022
d9788eb
Merge pull request #23 from mendelsshop/fix_python
mendelsshop Dec 22, 2022
d60e4da
bumped main lib version & backend threaad version remove/added from s…
mendelsshop Dec 22, 2022
808f278
Merge branch 'main' into other_language_support
mendelsshop Dec 22, 2022
4fbc137
update changelog
mendelsshop Dec 22, 2022
21bb6a5
nearly can publish now that rustpython no longer end_lines no longer …
mendelsshop Jan 11, 2023
005fd5d
update changelog
mendelsshop Jan 11, 2023
9f15172
Merge branch 'other_language_support' into fix_python
mendelsshop Jan 11, 2023
c324b74
Merge pull request #29 from mendelsshop/fix_python
mendelsshop Jan 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 43 additions & 3 deletions .github/workflows/cargo_clippy_lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,38 @@ jobs:
steps:
- uses: actions/checkout@v1
- run: |
rustup component add clippy

rustup toolchain install nightly
rustup +nightly component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -p git_function_history
toolchain: nightly
args: -p git_function_history --features unstable
# --features c_lang
# nightly-clang-test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: setup rust
# uses: dtolnay/rust-toolchain@stable
# with:
# toolchain: nightly
# override: true
# - name: test
# run: |
# cargo +nightly test -p git_function_history --features unstable --features c_lang -- --nocapture

# test-clang:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: setup rust
# uses: dtolnay/rust-toolchain@stable
# - name: test
# run: |
# cargo test -p git_function_history --features c_lang -- --nocapture

test:
runs-on: ubuntu-latest
steps:
Expand All @@ -21,4 +48,17 @@ jobs:
uses: dtolnay/rust-toolchain@stable
- name: test
run: |
cargo test -p git_function_history -- --nocapture
cargo test -p git_function_history -- --nocapture

test-nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
override: true
- name: test
run: |
cargo +nightly test -p git_function_history --features unstable -- --nocapture
4 changes: 2 additions & 2 deletions .github/workflows/chanelog.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Action Test
name: changelog-generator

on: [push]

Expand All @@ -25,6 +25,6 @@ jobs:
- name: Commit the changelog
uses: EndBug/add-and-commit@v7
with:
message: "chore: update changelog"
message: "update changelog"
add: ${{ steps.git-cliff.outputs.changelog }}

30 changes: 30 additions & 0 deletions .github/workflows/msrv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: msrv-badge

on:
pull_request:
push:
workflow_dispatch:

jobs:
create-msrv-badge:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: spenserblack/actions-msrv@v0.4.1
id: get-msrv
with:
set: true
- name: Create Badge
run: curl https://img.shields.io/badge/minimum%20rust%20version-${{ steps.get-msrv.outputs.msrv }}-blue > resources/msrv.svg
- name: Commit Badge
# If there are no changes to the badge this would error out. But it
# isn't a problem if there were no changes, so errors are allowed.
continue-on-error: true
run: |
git add resources/msrv.svg
git add **/Cargo.toml
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -m "Update MSRV badge [Skip CI]"
git push
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,40 @@ All notable changes to this project will be documented in this file.
- Update changelog
- Update changelog
- Update changelog
- Update changelog
- Update changelog
- Update changelog
- Update changelog

### TODO

- Figure out how to map filers and seraches based languges

### Changelog

- Trying to fix changelog

### Gui

- Added scrollbar to command builder & now supports other languages
- Started working on clickable dates/commits using list

### Lib

- Python works besides for one edge case when the function is the last node
- Pl filters now working very messy and boilerplatety
- Fixed bug where I didnt understand how cfg-if works, also filter_by macro works just neeeds docs

### Tui

- Saving search history to a file now
- Shortend filter loc
- Added more filters

## [2.1.0] - 2022-09-28

### Library

- Added git filters for commit, aothor and emai, messagel
- More parllesim
- Trying to optimize threading realizng the problem is not with the trreading but with something else
- Added parelel as optinal (but default feature
Expand Down
12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
# ![Custom badge](https://img.shields.io/endpoint?color=green&url=https%3A%2F%2Fraw.githubusercontent.com%2Fmendelsshop%2Fgit_function_history%2Fstats%2Floc.json) ![Custom badge](https://img.shields.io/endpoint?color=green&url=https%3A%2F%2Fraw.githubusercontent.com%2Fmendelsshop%2Fgit_function_history%2Fstats%2Fdownloads.json) [![dependency status](https://deps.rs/repo/github/mendelsshop/git_function_history/status.svg)](https://deps.rs/repo/github/mendelsshop/git_function_history)
# ![Custom badge](https://img.shields.io/endpoint?color=green&url=https%3A%2F%2Fraw.githubusercontent.com%2Fmendelsshop%2Fgit_function_history%2Fstats%2Floc.json) ![Custom badge](https://img.shields.io/endpoint?color=green&url=https%3A%2F%2Fraw.githubusercontent.com%2Fmendelsshop%2Fgit_function_history%2Fstats%2Fdownloads.json) [![dependency status](https://deps.rs/repo/github/mendelsshop/git_function_history/status.svg)](https://deps.rs/repo/github/mendelsshop/git_function_history) ![msrv](./resources/msrv.svg)

# git function history

## benchmarks

Parser (main) vs Regex approach benchmarks:
| approach| expensive| relative| date-range |
| --- | --- | --- | --- |
|regex| 313 second(s) | 22 second(s) | 8 second(s) |
|parser| 22 second(s) | 21 second(s)| 1 second(s) |

* These benchmarks were done in debug mode on a Ryzen 7 5700u with 16Gb of ram.

## crates in this project

* [git-function-history-lib](https://github.com/mendelsshop/git_function_history/tree/main/git-function-history-lib) - the library itself
Expand Down
26 changes: 24 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

- GUI
- [x] fix `thread '<unnamed>' panicked at 'channel disconnected', function_history_backend_thread/src/lib.rs:33:25` error (handling when the channel is disconnected at the end of the program)
- [x] add new documentation for the new filters and fix some old documentation that talks about filter commitfunctions and files etc
- [x] add new documentation for the new filters and fix some old documentation that talks about filter and files etc
- TUI
- [x] use a proper input box for the edit bar, so that delete and scrolling the input works
- [x] finish documentation
Expand All @@ -23,5 +23,27 @@
- [ ] add more and better ways to filter dates
- [x] add filters for git specific stuff like author, committer, etc
- [ ] ability to get a git repo from a url using something like git clone
- [ ] add support for other languages (currently only supports rust)
- [/] add support for other languages (currently only supports rust)
- [x] save search queries and filters to a file
- [ ] rework the way filters and filefilters are handled ie maybe use a builder pattern
- [/] remove all potentially panicking code

- release 7.0:
- python:
- [x] save parent function and classes
- [x] save kwargs and varargs etc using the args enum and be able to filter by all args or just kwargs etc
- ruby:
- [ ] save kwargs and varargs etc using the args enum and be able to filter by all args or just kwargs etc
- gui:
- [ ] make the list of dates clickable so when you click on a date/commit it will automatically run a search for that date/commit
- [ ] make list command a table wiht rows and columns for date, commit, author, message, etc
- [ ] (possibly) use tree sitter to provide syntax highlighting
- tui:
- [ ] make list command a table wiht rows and columns for date, commit, author, message, etc
- [ ] (possibly) use tree sitter to provide syntax highlighting
- lib:
- [x] possibly stop using Commmad::new("git") and use https://crates.io/crates/git_rs OR https://crates.io/crates/rs-git-lib OR https://crates.io/crates/gitoxide, to imporve performance with program compibilty assistant sevice on windows

- [ ] move language module into its own crate
- general:
- [/] update readmes with feautes and benchamrks specifically the repo & git-function-history-lib readmes
19 changes: 10 additions & 9 deletions cargo-function-history/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ description = "cargo frontend for git-function-history"
[features]
default = ["parallel"]
parallel = ["git_function_history/parallel", "function_history_backend_thread/parallel"]
not-parallel = []
# c_lang = ["function_history_backend_thread/c_lang", "git_function_history/c_lang"]
unstable = ["function_history_backend_thread/unstable", "git_function_history/unstable"]

[dependencies]
git_function_history = { path = "../git-function-history-lib", version = "0.6.2", default-features = false}
lazy_static = "1.3.0"
tui = { version = "0.19", features = ["crossterm"], default-features = false }
git_function_history = { path = "../git-function-history-lib", version = "0.7.0", default-features = false}
lazy_static = "1.4.0"
tui = { version = "0.19.0", features = ["crossterm"], default-features = false }
crossterm = "0.25.0"
tokio = { version = "1.21.2", features = ["full"] }
eyre = "0.6"
tokio = { version = "1.24.1", features = ["full"] }
eyre = "0.6.8"
dirs = "4.0.0"
simple_file_logger = "0.3.1"
log = "0.4"
function_history_backend_thread = { path = "../function_history_backend_thread", version = "0.2.2", default-features = false}
tui-input = "0.5.1"
log = "0.4.17"
function_history_backend_thread = { path = "../function_history_backend_thread", version = "0.3.0", default-features = false}
tui-input = "0.6.1"
2 changes: 1 addition & 1 deletion cargo-function-history/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [![crates.io](https://img.shields.io/crates/v/cargo-function-history.svg?label=latest%20version)](https://crates.io/crates/cargo-function-history) [![Crates.io](https://img.shields.io/crates/d/cargo-function-history?label=crates.io%20downloads)](https://crates.io/crates/cargo-function-history)
# [![crates.io](https://img.shields.io/crates/v/cargo-function-history.svg?label=latest%20version)](https://crates.io/crates/cargo-function-history) [![Crates.io](https://img.shields.io/crates/d/cargo-function-history?label=crates.io%20downloads)](https://crates.io/crates/cargo-function-history) ![msrv](../resources/msrv.svg)

# cargo function history

Expand Down
35 changes: 20 additions & 15 deletions cargo-function-history/src/app/actions.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use std::collections::HashMap;
use std::fmt::{self, Display};
use std::slice::Iter;
use std::{
collections::HashMap,
fmt::{self, Display},
slice::Iter,
};

use crate::keys::Key;

Expand Down Expand Up @@ -51,17 +53,20 @@ impl Action {
/// Could display a user friendly short description of action
impl Display for Action {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let str = match self {
Action::Quit => "Quit",
Action::TextEdit => "TextEdit",
Action::ScrollUp => "ScrollUp",
Action::ScrollDown => "ScrollDown",
Action::BackCommit => "BackCommit",
Action::ForwardCommit => "ForwardCommit",
Action::BackFile => "BackFile",
Action::ForwardFile => "ForwardFile",
};
write!(f, "{}", str)
write!(
f,
"{}",
match self {
Action::Quit => "Quit",
Action::TextEdit => "TextEdit",
Action::ScrollUp => "ScrollUp",
Action::ScrollDown => "ScrollDown",
Action::BackCommit => "BackCommit",
Action::ForwardCommit => "ForwardCommit",
Action::BackFile => "BackFile",
Action::ForwardFile => "ForwardFile",
}
)
}
}

Expand Down Expand Up @@ -113,7 +118,7 @@ impl From<Vec<Action>> for Actions {
.map(Action::to_string)
.collect::<Vec<_>>()
.join(", ");
format!("Conflict key {} with actions {}", key, actions)
format!("Conflict key {key} with actions {actions}")
})
.collect::<Vec<_>>();
if !errors.is_empty() {
Expand Down
Loading