Skip to content

Commit

Permalink
Fix clippy 1.71 warnings (#424)
Browse files Browse the repository at this point in the history
Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^[email protected]>
  • Loading branch information
maflcko and MarcoFalke authored Jul 21, 2023
1 parent 01e8024 commit 7590176
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
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

0 comments on commit 7590176

Please sign in to comment.