Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiling #51

Merged
merged 3 commits into from
Oct 24, 2022
Merged

Fix compiling #51

merged 3 commits into from
Oct 24, 2022

Conversation

Gusted
Copy link
Member

@Gusted Gusted commented Oct 22, 2022

  • I made some mistakes while checking my two previous PRs(Seems like I don't understand Rust that great after all).
  • Do the url encoding only on the password part, not only the whole URL.
  • Fix temporary value dropped while borrowed compile error.

- I made some mistakes while checking my two previous PRs(Seems like I
don't understand Rust that great after all).
- Do the url encoding only on the password part, not only the whole URL.
- Fix `temporary value dropped while borrowed` compile error.
Copy link
Member

@realaravinth realaravinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. The patch is mostly okay, can be merged after the suggested changes are applied

log::info!("{}", format!("Loading config file from {}", absolute_path));
s.merge(File::with_name(absolute_path))?;
let absolute_path = Path::new(&path).canonicalize().unwrap();
log::info!(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format! is redundant here, log::info! macro is capable of formatting, just like format! and print!

let absolute_path = fs::canonicalize(CURRENT_DIR).unwrap().to_str().unwrap();
log::info!("{}", format!("Loading config file from {}", absolute_path));
let absolute_path = fs::canonicalize(CURRENT_DIR).unwrap();
log::info!(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant format!, please see above comment

Copy link
Member

@realaravinth realaravinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks!

@realaravinth realaravinth merged commit ac502b7 into mCaptcha:master Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants