Fix rust nightly warnings about unused import in tests

This commit is contained in:
Olivier Goffart 2024-02-28 10:11:03 +01:00
parent aa7360a91a
commit c71b58e556
5 changed files with 1 additions and 16 deletions

View file

@ -5,7 +5,6 @@
#![doc(html_logo_url = "https://slint.dev/logo/slint-logo-square-light.svg")]
extern crate proc_macro;
use core::iter::IntoIterator;
use core::str::FromStr;
use proc_macro::{Delimiter, TokenStream, TokenTree};

View file

@ -1045,19 +1045,8 @@ pub(crate) mod ffi {
#[cfg(test)]
mod tests {
#![allow(unsafe_code)]
use super::*;
use crate::accessibility::AccessibleStringProperty;
use crate::items::AccessibleRole;
use crate::layout::{LayoutInfo, Orientation};
use crate::slice::Slice;
use crate::window::WindowAdapterRc;
use crate::SharedString;
use vtable::VRc;
struct TestItemTree {
parent_component: Option<ItemTreeRc>,
item_tree: Vec<ItemTreeNode>,

View file

@ -333,8 +333,6 @@ impl<T: Clone + InterpolatedPropertyValue + 'static> Property<T> {
#[cfg(test)]
mod animation_tests {
use super::*;
use crate::items::PropertyAnimation;
use std::rc::Rc;
#[derive(Default)]
struct Component {

View file

@ -1098,7 +1098,6 @@ mod tests {
use super::*;
use crate::fmt::writer::FileWriter;
use i_slint_compiler::diagnostics::BuildDiagnostics;
use i_slint_compiler::parser::syntax_nodes;
// FIXME more descriptive errors when an assertion fails
fn assert_formatting(unformatted: &str, formatted: &str) {

View file

@ -81,7 +81,7 @@ pub fn format_document(
#[cfg(test)]
mod tests {
use super::*;
use lsp_types::{Position, Range, TextEdit};
use lsp_types::{Position, Range};
/// Given an unformatted source text, return text edits that will turn the source into formatted text
fn get_formatting_edits(source: &str) -> Option<Vec<TextEdit>> {