mirror of
https://github.com/Hopiu/lychee.git
synced 2026-03-16 20:50:25 +00:00
Fix clippy lints
This commit is contained in:
parent
b49a2e5737
commit
94dda21326
3 changed files with 16 additions and 2 deletions
|
|
@ -22,6 +22,16 @@ Try one of these links to get started:
|
|||
If you would like to contribute a new feature, the best way to get started is to
|
||||
ask for some early feedback by creating an issue yourself and asking for feedback.
|
||||
|
||||
## Development Workflow
|
||||
|
||||
1. Create a new development branch for your feature or bugfix.
|
||||
2. Make your changes and commit them.
|
||||
3. Run `cargo test` and `cargo clippy` to make sure your changes don't break anything.
|
||||
We provide a few `make` targets to make this easier:
|
||||
- `make lint` runs `cargo clippy` on all crates
|
||||
- `make help` lists all available targets
|
||||
4. Push your changes to your fork and create a pull request.
|
||||
|
||||
## Thanks!
|
||||
|
||||
No matter how small, we appreciate very contribution. You're awesome!
|
||||
|
|
|
|||
4
Makefile
4
Makefile
|
|
@ -34,6 +34,10 @@ run: ## Run project locally
|
|||
docs: ## Generate and show documentation
|
||||
cargo doc --open
|
||||
|
||||
.PHONY: lint
|
||||
lint: ## Run linter
|
||||
cargo clippy --all-targets --all-features -- -D warnings
|
||||
|
||||
.PHONY: screencast
|
||||
screencast: ## Create a screencast for the docs
|
||||
svg-term --command 'assets/screencast.sh' --out 'assets/screencast.svg' --width 100 --padding 10 --window
|
||||
|
|
@ -396,7 +396,7 @@ impl Client {
|
|||
let status = if self.filter.is_excluded(&uri) {
|
||||
Status::Excluded
|
||||
} else if uri.is_file() {
|
||||
self.check_file(&uri).await
|
||||
self.check_file(&uri)
|
||||
} else if uri.is_mail() {
|
||||
self.check_mail(&uri).await
|
||||
} else {
|
||||
|
|
@ -539,7 +539,7 @@ impl Client {
|
|||
}
|
||||
|
||||
/// Check a `file` URI.
|
||||
pub async fn check_file(&self, uri: &Uri) -> Status {
|
||||
pub fn check_file(&self, uri: &Uri) -> Status {
|
||||
if let Ok(path) = uri.url.to_file_path() {
|
||||
if path.exists() {
|
||||
return Status::Ok(StatusCode::OK);
|
||||
|
|
|
|||
Loading…
Reference in a new issue