all: Add `#[allow(dead_code)]` exemptions to prepare for Rust 1.79.0.
This commit is contained in:
Родитель
16fdc3b6fe
Коммит
5d0ad19431
|
@ -96,6 +96,7 @@ pub(crate) trait FxAClient {
|
|||
session_token: &str,
|
||||
auth_params: AuthorizationRequestParameters,
|
||||
) -> Result<OAuthAuthResponse>;
|
||||
#[allow(dead_code)]
|
||||
fn duplicate_session_token(
|
||||
&self,
|
||||
config: &Config,
|
||||
|
@ -145,7 +146,9 @@ pub(crate) trait FxAClient {
|
|||
client_id: &str,
|
||||
scope: &str,
|
||||
) -> Result<HashMap<String, ScopedKeyDataResponse>>;
|
||||
#[allow(dead_code)]
|
||||
fn get_fxa_client_configuration(&self, config: &Config) -> Result<ClientConfigurationResponse>;
|
||||
#[allow(dead_code)]
|
||||
fn get_openid_configuration(&self, config: &Config) -> Result<OpenIdConfigurationResponse>;
|
||||
fn simulate_network_error(&self) {}
|
||||
}
|
||||
|
@ -680,6 +683,7 @@ pub struct ResponseAndETag<T> {
|
|||
#[derive(Deserialize)]
|
||||
pub struct PendingCommandsResponse {
|
||||
pub index: u64,
|
||||
#[allow(dead_code)]
|
||||
pub last: Option<bool>,
|
||||
pub messages: Vec<PendingCommand>,
|
||||
}
|
||||
|
@ -902,8 +906,10 @@ pub struct OAuthTokenResponse {
|
|||
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct OAuthAuthResponse {
|
||||
#[allow(dead_code)]
|
||||
pub redirect: String,
|
||||
pub code: String,
|
||||
#[allow(dead_code)]
|
||||
pub state: String,
|
||||
}
|
||||
|
||||
|
@ -938,9 +944,12 @@ impl From<ProfileResponse> for crate::Profile {
|
|||
|
||||
#[derive(Deserialize)]
|
||||
pub struct ScopedKeyDataResponse {
|
||||
#[allow(dead_code)]
|
||||
pub identifier: String,
|
||||
#[allow(dead_code)]
|
||||
#[serde(rename = "keyRotationSecret")]
|
||||
pub key_rotation_secret: String,
|
||||
#[allow(dead_code)]
|
||||
#[serde(rename = "keyRotationTimestamp")]
|
||||
pub key_rotation_timestamp: u64,
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ pub fn random_base64_url_string(len: usize) -> Result<String> {
|
|||
}
|
||||
|
||||
pub trait Xorable {
|
||||
#[allow(dead_code)]
|
||||
fn xored_with(&self, other: &[u8]) -> Result<Vec<u8>>;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ pub(crate) fn create_client(
|
|||
|
||||
// The trait used to fetch experiments.
|
||||
pub(crate) trait SettingsClient {
|
||||
#[allow(dead_code)]
|
||||
fn get_experiments_metadata(&self) -> Result<String>;
|
||||
fn fetch_experiments(&self) -> Result<Vec<Experiment>>;
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ pub struct RegisterResponse {
|
|||
pub endpoint: String,
|
||||
|
||||
/// The sender id
|
||||
#[allow(dead_code)]
|
||||
#[serde(rename = "senderid")]
|
||||
pub sender_id: Option<String>,
|
||||
}
|
||||
|
@ -73,6 +74,7 @@ pub struct SubscribeResponse {
|
|||
pub endpoint: String,
|
||||
|
||||
/// The sender id
|
||||
#[allow(dead_code)]
|
||||
#[serde(rename = "senderid")]
|
||||
pub sender_id: Option<String>,
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ pub trait Storage: Sized {
|
|||
|
||||
fn get_channel_list(&self) -> Result<Vec<String>>;
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn update_endpoint(&self, channel_id: &str, endpoint: &str) -> Result<bool>;
|
||||
|
||||
// Some of our "meta" keys are more important than others, so they get special helpers.
|
||||
|
|
|
@ -34,6 +34,7 @@ impl RelevancyRemoteSettingsClient for remote_settings::Client {
|
|||
/// A record in the Relevancy Remote Settings collection.
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
pub struct RelevancyRecord {
|
||||
#[allow(dead_code)]
|
||||
#[serde(rename = "type")]
|
||||
pub record_type: String,
|
||||
pub record_custom_details: RecordCustomDetails,
|
||||
|
@ -48,7 +49,9 @@ pub struct RecordCustomDetails {
|
|||
/// Category information related to the record.
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
pub struct CategoryToDomains {
|
||||
#[allow(dead_code)]
|
||||
pub version: i32,
|
||||
#[allow(dead_code)]
|
||||
pub category: String,
|
||||
pub category_code: i32,
|
||||
}
|
||||
|
|
|
@ -29,6 +29,8 @@ impl Registry for TaskClusterRegistry {
|
|||
Ok(Some(resp.version))
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub struct ReqwestGunzippingHttpClient;
|
||||
|
||||
impl HttpClient for ReqwestGunzippingHttpClient {
|
||||
|
|
|
@ -181,6 +181,7 @@ pub trait CodeType {
|
|||
|
||||
/// Optional helper code to make this type work.
|
||||
/// This might include functions to patch a default value with another.
|
||||
#[allow(dead_code)]
|
||||
fn helper_code(&self, _oracle: &dyn CodeOracle) -> Option<String> {
|
||||
None
|
||||
}
|
||||
|
|
|
@ -13,8 +13,6 @@ use std::time::Instant;
|
|||
|
||||
use crate::maybe_cached::MaybeCached;
|
||||
|
||||
pub struct Conn(rusqlite::Connection);
|
||||
|
||||
/// This trait exists so that we can use these helpers on `rusqlite::{Transaction, Connection}`.
|
||||
/// Note that you must import ConnExt in order to call these methods on anything.
|
||||
pub trait ConnExt {
|
||||
|
|
|
@ -36,6 +36,7 @@ struct WhenTook {
|
|||
|
||||
/// What we track while recording 'when' and 'took. It serializes as a WhenTook,
|
||||
/// except when .finished() hasn't been called, in which case it panics.
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug)]
|
||||
enum Stopwatch {
|
||||
Started(time::SystemTime, time::Instant),
|
||||
|
|
|
@ -46,7 +46,9 @@ pub struct TestEngine {
|
|||
pub engine_sync_assoc: RefCell<EngineSyncAssociation>,
|
||||
pub was_reset_called: Cell<bool>,
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub global_id: Option<Guid>,
|
||||
#[allow(dead_code)]
|
||||
pub coll_id: Option<Guid>,
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче