diff --git a/Cargo.toml b/Cargo.toml index c3dc42d..12f440b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.3.0" authors = ["Sagie Gur-Ari "] description = "File System and Path utility functions." license = "Apache-2.0" -edition = "2018" +edition = "2021" documentation = "https://sagiegurari.github.io/fsio/api/fsio/index.html" homepage = "http://github.com/sagiegurari/fsio" repository = "https://github.com/sagiegurari/fsio.git" diff --git a/src/file.rs b/src/file.rs index 3c04b6d..22013a1 100644 --- a/src/file.rs +++ b/src/file.rs @@ -219,7 +219,7 @@ pub fn append_file(path: &T, data: &[u8]) -> FsIOResult<()> /// ``` pub fn modify_file( path: &T, - write_content: &Fn(&mut File) -> io::Result<()>, + write_content: &dyn Fn(&mut File) -> io::Result<()>, append: bool, ) -> FsIOResult<()> { directory::create_parent(path)?; diff --git a/src/lib.rs b/src/lib.rs index 73e4a45..6cf77b9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,6 +7,7 @@ asm_sub_register, bad_asm_style, bindings_with_variant_name, + break_with_label_and_loop, cenum_impl_drop_cast, clashing_extern_declarations, coherence_leak_check, @@ -17,11 +18,15 @@ const_item_mutation, dead_code, deprecated, + deprecated_cfg_attr_crate_type_name, deprecated_in_future, + deref_into_dyn_supertrait, deref_nullptr, drop_bounds, + duplicate_macro_attributes, dyn_drop, ellipsis_inclusive_range_patterns, + enum_intrinsics_non_enums, explicit_outlives_requirements, exported_private_dependencies, forbidden_lint_groups, @@ -35,6 +40,7 @@ indirect_structural_match, ineffective_unstable_trait_impl, inline_no_sanitize, + invalid_atomic_ordering, invalid_doc_attributes, invalid_type_param_default, invalid_value, @@ -52,6 +58,7 @@ mixed_script_confusables, mutable_borrow_reservation_conflict, mutable_transmutes, + named_asm_labels, no_mangle_const_items, no_mangle_generic_items, non_ascii_idents, @@ -81,6 +88,8 @@ soft_unstable, stable_features, temporary_cstring_as_ptr, + text_direction_codepoint_in_comment, + text_direction_codepoint_in_literal, trivial_bounds, trivial_casts, trivial_numeric_casts, @@ -104,6 +113,7 @@ unsupported_naked_functions, unused_allocation, unused_assignments, + unused_assignments, unused_attributes, unused_braces, unused_comparisons, @@ -122,7 +132,9 @@ unused_qualifications, unused_unsafe, unused_variables, - useless_deprecated + useless_deprecated, + where_clauses_object_safety, + while_true )] #![warn(macro_use_extern_crate, unknown_lints)] #![allow(