From eab3a31c5750013c53c0eb02adc976d6757dc9f7 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 2 Jul 2026 01:32:03 +0900 Subject: chore(lint): ban std::io::Read/Write, Any, Command use imports Extends no_banned_use to cover std::any::Any, std::io::Read/Write, and std::process::Command, and teaches the linter to allow `as _` imports so trait methods can still be brought into scope without binding the banned name. Fully qualifies all existing usages across the codebase. --- crates/shirabe-php-shim/src/xml.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'crates/shirabe-php-shim/src/xml.rs') diff --git a/crates/shirabe-php-shim/src/xml.rs b/crates/shirabe-php-shim/src/xml.rs index cc323ca..b3938da 100644 --- a/crates/shirabe-php-shim/src/xml.rs +++ b/crates/shirabe-php-shim/src/xml.rs @@ -5,7 +5,6 @@ //! handles over that graph. use std::cell::RefCell; -use std::io::Write; use std::rc::{Rc, Weak}; #[derive(Debug, Clone, Copy, PartialEq)] @@ -120,7 +119,7 @@ impl DOMDocument { self.0.borrow_mut().format_output = value; } - pub fn save_xml(&self, writer: &mut W) -> std::io::Result<()> { + pub fn save_xml(&self, writer: &mut W) -> std::io::Result<()> { let doc = self.0.borrow(); writeln!( writer, @@ -250,7 +249,7 @@ fn collect_by_tag( } } -fn serialize_node( +fn serialize_node( node: &Rc>, depth: usize, format: bool, @@ -305,14 +304,14 @@ fn serialize_node( Ok(()) } -fn write_indent(out: &mut W, depth: usize) -> std::io::Result<()> { +fn write_indent(out: &mut W, depth: usize) -> std::io::Result<()> { for _ in 0..depth { out.write_all(b" ")?; } Ok(()) } -fn escape_text(s: &str, out: &mut W) -> std::io::Result<()> { +fn escape_text(s: &str, out: &mut W) -> std::io::Result<()> { let mut buf = [0u8; 4]; for c in s.chars() { match c { @@ -326,7 +325,7 @@ fn escape_text(s: &str, out: &mut W) -> std::io::Result<()> { Ok(()) } -fn escape_attribute(s: &str, out: &mut W) -> std::io::Result<()> { +fn escape_attribute(s: &str, out: &mut W) -> std::io::Result<()> { let mut buf = [0u8; 4]; for c in s.chars() { match c { -- cgit v1.3.1