sobelio / llm-chain

`llm-chain` is a powerful rust crate for building chains in large language models allowing you to summarise text and complete complex tasks
https://llm-chain.xyz
MIT License
1.31k stars 128 forks source link

Chore: cargo clippy #121

Closed AnthonyMichaelTDM closed 1 year ago

AnthonyMichaelTDM commented 1 year ago

This PR fixes various clippy lints

I first ran cargo clippy --fix, then fixed remaining lints manually

this is both non-essential and should be reviewed before merging, because it changes a bunch of files and could cause conflicts with stuff other people are working on

williamhogman commented 1 year ago

Looks like someone forgot to run cargo fmt ;)

AnthonyMichaelTDM commented 1 year ago

Looks like someone forgot to run cargo fmt ;)

yeah haha

AnthonyMichaelTDM commented 1 year ago

should probably make a git hook for that ...

williamhogman commented 1 year ago

should probably make a git hook for that ...

Would love to have something along those lines

AnthonyMichaelTDM commented 1 year ago

adding a file named pre-commit to your .git/hooks/ directory, with the following content:

cargo fmt --all -- --check

then making it executable with chmod +x .git/hooks/pre-commit

does the trick

williamhogman commented 1 year ago

adding a file named pre-commit to your .git/hooks/ directory, with the following content:

cargo fmt --all -- --check

then making it executable with chmod +x .git/hooks/pre-commit

does the trick

Right but usually you'd want a wrapper such as pre-commit or similar :)