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 clippy 1.71 warnings #424

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: cargo fmt --all -- --check
- run: cargo clippy --tests
- run: cargo clippy --tests --examples
15 changes: 0 additions & 15 deletions src/api/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,6 @@ impl<'octo> SearchHandler<'octo> {
}
}

#[derive(Clone, Debug)]
pub enum ContentType {
TextMatch,
Default,
}

impl Default for ContentType {
fn default() -> Self {
Self::Default
}
}

/// A handler for handling search queries to GitHub.
#[derive(Clone, Debug, serde::Serialize)]
pub struct QueryHandler<'octo, 'query, T> {
Expand All @@ -136,8 +124,6 @@ pub struct QueryHandler<'octo, 'query, T> {
crab: &'octo Octocrab,
#[serde(skip)]
route: &'static str,
#[serde(skip)]
content_type: ContentType,
#[serde(rename = "q")]
query: &'query str,
per_page: Option<u8>,
Expand All @@ -151,7 +137,6 @@ pub struct QueryHandler<'octo, 'query, T> {
impl<'octo, 'query, T> QueryHandler<'octo, 'query, T> {
pub(crate) fn new(crab: &'octo Octocrab, route: &'static str, query: &'query str) -> Self {
Self {
content_type: ContentType::Default,
crab,
order: None,
page: None,
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,9 +541,9 @@ impl OctocrabBuilder<NoSvc, DefaultOctocrabBuilderConfig, NoAuth, NotLayerReady>
#[cfg(all(feature = "rustls", not(feature = "opentls")))]
let connector = {
let builder = HttpsConnectorBuilder::new();
#[cfg(all(feature = "rustls-webpki-tokio"))]
#[cfg(feature = "rustls-webpki-tokio")]
let builder = builder.with_webpki_roots();
#[cfg(all(not(feature = "rustls-webpki-tokio")))]
#[cfg(not(feature = "rustls-webpki-tokio"))]
let builder = builder.with_native_roots(); // enabled the `rustls-native-certs` feature in hyper-rustls

builder
Expand Down
Loading