Bug 1736484 - Fix new dead-code warnings with rust 1.57. r=gfx-reviewers,nical

Differential Revision: https://phabricator.services.mozilla.com/D128825
This commit is contained in:
Mike Hommey 2021-10-20 00:13:12 +00:00
parent 4aa571147f
commit fcd6e6f3ae
5 changed files with 2 additions and 21 deletions

View File

@ -1706,7 +1706,7 @@ pub extern "C" fn wr_window_new(
#[no_mangle]
pub unsafe extern "C" fn wr_api_free_error_msg(msg: *mut c_char) {
if !msg.is_null() {
CString::from_raw(msg);
drop(CString::from_raw(msg));
}
}

View File

@ -386,7 +386,6 @@ impl<T> Drop for VBO<T> {
pub struct ExternalTexture {
id: gl::GLuint,
target: gl::GLuint,
swizzle: Swizzle,
uv_rect: TexelRect,
}
@ -394,13 +393,11 @@ impl ExternalTexture {
pub fn new(
id: u32,
target: ImageBufferKind,
swizzle: Swizzle,
uv_rect: TexelRect,
) -> Self {
ExternalTexture {
id,
target: get_gl_target(target),
swizzle,
uv_rect,
}
}

View File

@ -686,17 +686,7 @@ pub enum ResultMsg {
}
#[derive(Clone, Debug)]
pub struct ResourceCacheError {
description: String,
}
impl ResourceCacheError {
pub fn new(description: String) -> ResourceCacheError {
ResourceCacheError {
description,
}
}
}
pub struct ResourceCacheError;
/// Primitive metadata we pass around in a bunch of places
#[derive(Copy, Clone, Debug)]

View File

@ -1429,9 +1429,6 @@ pub struct Counter {
/// Incremented when the counter changes.
change_indicator: u8,
/// Only used to check that the constants match the real index.
index: usize,
graph: Option<Graph>,
}
@ -1442,7 +1439,6 @@ impl Counter {
unit: descriptor.unit,
show_as: descriptor.show_as,
expected: descriptor.expected.clone(),
index: descriptor.index,
value: std::f64::NAN,
num_samples: 0,
sum: 0.0,

View File

@ -4272,7 +4272,6 @@ impl Renderer {
ExternalTexture::new(
texture_id,
texture_target,
Swizzle::default(),
image.uv,
)
}
@ -4287,7 +4286,6 @@ impl Renderer {
ExternalTexture::new(
0,
texture_target,
Swizzle::default(),
image.uv,
)
}