diff --git a/src/bindings.rs b/src/bindings.rs index fc0d06988..56bfa1730 100644 --- a/src/bindings.rs +++ b/src/bindings.rs @@ -7141,7 +7141,7 @@ pub struct _xmlSAXLocator { /// the application can either: /// - override this resolveEntity() callback in the SAX block /// - or better use the xmlSetExternalEntityLoader() function to -/// set up it's own entity resolution routine +/// set up its own entity resolution routine /// /// Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. pub type resolveEntitySAXFunc = ::std::option::Option< @@ -14206,8 +14206,10 @@ pub type xmlXPathFuncLookupFunc = ::std::option::Option< /// - a set of variable bindings /// - a function library /// - the set of namespace declarations in scope for the expression +/// /// Following the switch to hash tables, this need to be trimmed up at /// the next binary incompatible release. +/// /// The node may be modified when the context is passed to libxml2 /// for an XPath evaluation so you may need to initialize it again /// before the next call. diff --git a/src/parser.rs b/src/parser.rs index 3284a70f4..4f6887e7e 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -72,7 +72,7 @@ pub struct ParserOptions<'a> { pub encoding: Option<&'a str>, } -impl<'a> ParserOptions<'a> { +impl ParserOptions<'_> { pub(crate) fn to_flags(&self, format: &ParseFormat) -> i32 { macro_rules! to_option_flag { ( @@ -103,7 +103,7 @@ impl<'a> ParserOptions<'a> { } } -impl<'a> Default for ParserOptions<'a> { +impl Default for ParserOptions<'_> { fn default() -> Self { ParserOptions { recover: true, @@ -191,7 +191,7 @@ type XmlCloseCallback = unsafe extern "C" fn(*mut c_void) -> c_int; ///Convert usize to i32 safely. fn try_usize_to_i32(value: usize) -> Result { - if cfg!(target_pointer_width = "16") || (value < i32::max_value() as usize) { + if cfg!(target_pointer_width = "16") || (value < i32::MAX as usize) { // Cannot safely use our value comparison, but the conversion if always safe. // Or, if the value can be safely represented as a 32-bit signed integer. Ok(value as i32)