Fixed warnings after Rust update.

This commit is contained in:
Samuel Guerra 2023-07-13 12:55:16 -03:00
parent 0e76ea15a6
commit 44e04c39e5
5 changed files with 4 additions and 17 deletions

View File

@ -36,18 +36,6 @@ fn cmd_impl(cmd: &str, default_args: &[&str], user_args: &[&str], envs: &[(&str,
cmd.env_remove(remove);
}
// rustup 1.25 sets these, breaks cargo +nightly
{
cmd.env_remove("RUSTC");
cmd.env_remove("RUSTDOC");
let orig_path = env::var_os("PATH").unwrap_or_default();
let modified_split_paths =
env::split_paths(&orig_path).filter(|path| !path.components().any(|component| component.as_os_str() == ".rustup"));
let modified_path = env::join_paths(modified_split_paths).expect("invalid PATH");
cmd.env("PATH", modified_path);
}
if TaskInfo::dump() {
if let Some(stdout) = TaskInfo::stdout_dump() {
cmd.stdout(Stdio::from(stdout));

View File

@ -217,7 +217,7 @@ event! {
/// [`FOCUS`]: crate::focus::FOCUS
/// [`WINDOWS`]: crate::window::WINDOWS
#[derive(Default)]
pub struct KeyboardManager;
pub struct KeyboardManager {}
impl AppExtension for KeyboardManager {
fn event_preview(&mut self, update: &mut EventUpdate) {
if let Some(args) = RAW_KEY_INPUT_EVENT.on(update) {

View File

@ -1405,7 +1405,7 @@ impl AsRef<str> for Txt {
}
impl std::borrow::Borrow<str> for Txt {
fn borrow(&self) -> &str {
self.0.borrow()
self.as_str()
}
}
impl<'a> std::ops::Add<&'a str> for Txt {

View File

@ -260,7 +260,7 @@ fn markdown_view_fn(md: &str) -> impl UiNode {
}
Tag::CodeBlock(kind) => {
if let Some(mut txt) = code_block_text.take() {
if txt.chars().rev().next() == Some('\n') {
if txt.ends_with('\n') {
txt.pop();
}
blocks.push(code_block_view(CodeBlockFnArgs {

View File

@ -1,9 +1,8 @@
//! Popup widget.
use crate::prelude::new_widget::*;
use crate::widgets::window::layers::LAYERS;
/// An overlay container designed for use in [`LAYERS`].
/// An overlay container.
#[widget($crate::widgets::popup::Popup)]
pub struct Popup(FocusableMix<StyleMix<EnabledMix<Container>>>);
impl Popup {