diff options
author | delta <darkussdelta@gmail.com> | 2023-05-21 10:12:46 +0200 |
---|---|---|
committer | delta <darkussdelta@gmail.com> | 2023-05-21 10:12:46 +0200 |
commit | f42a3a2cc941e34dd938b1e6bc24785a44781db2 (patch) | |
tree | bec91db370c7bcd5be2bb614d2d315a32c751215 /.config/awesome/quarrel/native/src/net | |
parent | f5612f081db0dc69f5c0ebc69e67fa3b098a9ad9 (diff) |
major update of awesome config
add new icons, switch over to using stylesheets instead of gears.color.recolor_image, add a music widget to the panel, optimize services in common.lua, fix the application lense filtering and increase the update rate of services in common.lua
Signed-off-by: delta <darkussdelta@gmail.com>
Diffstat (limited to '.config/awesome/quarrel/native/src/net')
-rw-r--r-- | .config/awesome/quarrel/native/src/net/mod.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/.config/awesome/quarrel/native/src/net/mod.rs b/.config/awesome/quarrel/native/src/net/mod.rs index c9d617c..71eaeea 100644 --- a/.config/awesome/quarrel/native/src/net/mod.rs +++ b/.config/awesome/quarrel/native/src/net/mod.rs @@ -10,7 +10,6 @@ use std::{ }, mem::size_of, os::fd::RawFd, - str, }; use mlua::prelude::*; @@ -23,7 +22,7 @@ use nix::{ SockFlag, SockType, }, - unistd::close + unistd::close, }; use wireless::{ IfConf, @@ -59,6 +58,7 @@ pub fn get_first_essid(_: &Lua, _: ()) -> LuaResult<String> { if_req = if_conf.data.ifc_req; } + #[allow(clippy::cast_possible_truncation)] for _ in 0..if_conf.ifc_len / size_of::<IfConf>() as c_int { if let Ok(essid) = get_essid(socket, unsafe { *if_req }.ifr_name) { close(socket).map_err(LuaError::external)?; @@ -90,9 +90,7 @@ fn get_essid(socket: RawFd, if_name: [c_char; IF_NAMESIZE]) -> LuaResult<String> ioctl_get_essid(socket, &mut wrq).map_err(LuaError::external)?; } - Ok(str::from_utf8(essid.as_slice()) - .map_err(LuaError::external)? - .to_owned()) + String::from_utf8(essid.to_vec()).map_err(LuaError::external) } fn get_first_socket() -> LuaResult<RawFd> { |