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

toolchain: bump to 1.79.0 #1784

Merged
merged 1 commit into from
Jun 14, 2024
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
10 changes: 5 additions & 5 deletions lib/event/src/tags/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl Key {
if s.len() <= INLINE_CAP {
Key::inline(&s)
} else {
unsafe { transmute(s) }
unsafe { transmute::<String, Key>(s) }
}
}

Expand Down Expand Up @@ -169,7 +169,7 @@ impl From<&str> for Key {
unsafe {
copy_nonoverlapping(v.as_ptr(), data.as_mut_ptr(), len);
data[KEY_SIZE - 1] = len as u8;
return transmute(data);
return transmute::<[u8; 24], Key>(data);
}
}

Expand All @@ -183,7 +183,7 @@ impl From<&String> for Key {
if v.len() < INLINE_CAP {
Key::inline(v)
} else {
unsafe { transmute(v.to_string()) }
unsafe { transmute::<String, Key>(v.to_string()) }
}
}
}
Expand All @@ -197,7 +197,7 @@ impl From<String> for Key {
impl From<Key> for String {
fn from(key: Key) -> Self {
if key.last == 0 {
return unsafe { transmute(key) };
return unsafe { transmute::<Key, String>(key) };
}

key.as_str().to_string()
Expand Down Expand Up @@ -272,7 +272,7 @@ mod serde {
let key = if len <= INLINE_CAP {
Key::inline(v)
} else {
unsafe { transmute(v.to_string()) }
unsafe { transmute::<String, Key>(v.to_string()) }
};

Ok(key)
Expand Down
1 change: 1 addition & 0 deletions lib/framework/src/config/watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ mod inotify {
///
/// A file system event that describes a change that the user previously
/// registered interest in. To watch for events.
#[allow(dead_code)]
pub struct Event<S> {
/// Identifies the watch this event originates from.
pub wd: i32,
Expand Down
28 changes: 1 addition & 27 deletions lib/virt/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,36 +227,10 @@ impl Client {
}

pub async fn storage_pools(&mut self) -> Result<Vec<StoragePoolInfo>, Error> {
/* let req = self.make_request(
REMOTE_PROC_CONNECT_LIST_STORAGE_POOLS,
ListAllStoragePoolsRequest::new(2), // 2 for active pools
);
let resp: ListAllStoragePoolsResponse = self.do_request(req).await?;
let pools = resp.pools();
let mut infos = Vec::with_capacity(pools.len());

for pool in pools {
let name = pool.name.0.clone();
let req = self.make_request(
REMOTE_PROC_STORAGE_POOL_GET_INFO,
StoragePoolGetInfoRequest::new(pool),
);
let resp: StoragePoolGetInfoResponse = self.do_request(req).await?;
infos.push(StoragePoolInfo {
name,
state: resp.0.state as u32,
capacity: resp.0.capacity,
allocation: resp.0.allocation,
available: resp.0.available,
})
}

Ok(infos)*/

let resp: ConnectListStoragePoolsResponse = self
.send(ConnectListStoragePoolsRequest { maxnames: 2 })
.await?;
let mut infos = Vec::with_capacity(resp.pools.len());
let mut infos = Vec::with_capacity(resp.ret as usize);

for pool in resp.pools {
let req = GetStoragePoolInfoRequest { pool: &pool };
Expand Down
1 change: 1 addition & 0 deletions lib/virt/src/protocol/get_all_domain_stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use super::{pack_flex, unpack_flex, unpack_string, Domain, Pack, Unpack};

pub const REMOTE_CONNECT_GET_ALL_DOMAIN_STATS_MAX: usize = 4096;

#[allow(dead_code)]
pub enum RemoteTypedParamValue {
Const1(i32),
Const2(u32),
Expand Down
1 change: 1 addition & 0 deletions lib/virt/src/protocol/get_domain_vcpus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ impl<R: Read> Unpack<R> for VcpuInfo {

pub struct GetDomainVcpusResponse {
pub infos: Vec<VcpuInfo>,
#[allow(dead_code)]
pub maps: Vec<u8>,
}

Expand Down
8 changes: 7 additions & 1 deletion lib/vtl/src/compiler/function_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ pub struct FunctionCall {
impl Expression for FunctionCall {
#[inline]
fn resolve(&self, cx: &mut Context) -> Result<Value, ExpressionError> {
self.function.resolve(cx)
self.function.resolve(cx).map_err(|err| match err {
ExpressionError::Error { message, .. } => ExpressionError::Error {
message,
span: self.span,
},
err => err,
})
}

#[inline]
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.78.0"
channel = "1.79.0"
2 changes: 2 additions & 0 deletions src/sinks/elasticsearch/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(dead_code)]

mod common;
mod config;
mod encoder;
Expand Down
1 change: 1 addition & 0 deletions src/sources/bind/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ pub struct ZoneView {
}

/// ThreadModel contains task and worker information
#[allow(dead_code)]
#[derive(Default, Deserialize)]
pub struct ThreadModel {
#[serde(rename = "type")]
Expand Down
1 change: 1 addition & 0 deletions src/sources/bind/client/v3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ mod tests {
DateTime::parse_from_rfc3339("2021-07-15T05:11:08.926Z").unwrap()
);
assert_eq!(stats.taskmgr.thread_model.worker_threads, 5);
assert_eq!(stats.taskmgr.thread_model.typ, "threaded");
assert_eq!(stats.views.views.len(), 2)
}

Expand Down
1 change: 1 addition & 0 deletions src/sources/libvirt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ async fn gather_v2(path: &str) -> Result<Vec<Metric>, Error> {
Ok(metrics)
}

#[allow(dead_code)]
mod schema {
use serde::Deserialize;

Expand Down