Skip to main content

delegation/
lib.rs

1#![cfg_attr(
2    any(doc, all(test, not(clippy))),
3    doc = include_str!("../README.md"),
4)]
5#![cfg_attr(
6    not(any(doc, all(test, not(clippy)))),
7    doc = env!("CARGO_PKG_NAME"),
8)]
9#![deny(nonstandard_style, rustdoc::all, trivial_casts, trivial_numeric_casts)]
10#![forbid(non_ascii_idents, unsafe_code)]
11#![warn(
12    clippy::absolute_paths,
13    clippy::allow_attributes,
14    clippy::allow_attributes_without_reason,
15    clippy::as_conversions,
16    clippy::as_pointer_underscore,
17    clippy::as_ptr_cast_mut,
18    clippy::assertions_on_result_states,
19    clippy::branches_sharing_code,
20    clippy::cfg_not_test,
21    clippy::clear_with_drain,
22    clippy::clone_on_ref_ptr,
23    clippy::coerce_container_to_any,
24    clippy::collection_is_never_read,
25    clippy::create_dir,
26    clippy::dbg_macro,
27    clippy::debug_assert_with_mut_call,
28    clippy::decimal_literal_representation,
29    clippy::default_union_representation,
30    clippy::derive_partial_eq_without_eq,
31    clippy::doc_include_without_cfg,
32    clippy::doc_paragraphs_missing_punctuation,
33    clippy::empty_drop,
34    clippy::empty_structs_with_brackets,
35    clippy::equatable_if_let,
36    clippy::empty_enum_variants_with_brackets,
37    clippy::exit,
38    clippy::expect_used,
39    clippy::fallible_impl_from,
40    clippy::filetype_is_file,
41    clippy::float_cmp_const,
42    clippy::fn_to_numeric_cast_any,
43    clippy::get_unwrap,
44    clippy::if_then_some_else_none,
45    clippy::imprecise_flops,
46    clippy::infinite_loop,
47    clippy::iter_on_empty_collections,
48    clippy::iter_on_single_items,
49    clippy::iter_over_hash_type,
50    clippy::iter_with_drain,
51    clippy::large_include_file,
52    clippy::large_stack_frames,
53    clippy::let_underscore_untyped,
54    clippy::literal_string_with_formatting_args,
55    clippy::lossy_float_literal,
56    clippy::map_err_ignore,
57    clippy::map_with_unused_argument_over_ranges,
58    clippy::mem_forget,
59    clippy::missing_assert_message,
60    clippy::missing_asserts_for_indexing,
61    clippy::missing_const_for_fn,
62    clippy::missing_docs_in_private_items,
63    clippy::module_name_repetitions,
64    clippy::multiple_inherent_impl,
65    clippy::multiple_unsafe_ops_per_block,
66    clippy::mutex_atomic,
67    clippy::mutex_integer,
68    clippy::needless_collect,
69    clippy::needless_pass_by_ref_mut,
70    clippy::needless_raw_strings,
71    clippy::needless_type_cast,
72    clippy::non_zero_suggestions,
73    clippy::nonstandard_macro_braces,
74    clippy::option_if_let_else,
75    clippy::or_fun_call,
76    clippy::panic_in_result_fn,
77    clippy::partial_pub_fields,
78    clippy::pathbuf_init_then_push,
79    clippy::pedantic,
80    clippy::precedence_bits,
81    clippy::print_stderr,
82    clippy::print_stdout,
83    clippy::pub_without_shorthand,
84    clippy::rc_buffer,
85    clippy::rc_mutex,
86    clippy::read_zero_byte_vec,
87    clippy::redundant_clone,
88    clippy::redundant_test_prefix,
89    clippy::redundant_type_annotations,
90    clippy::renamed_function_params,
91    clippy::ref_patterns,
92    clippy::rest_pat_in_fully_bound_structs,
93    clippy::return_and_then,
94    clippy::same_name_method,
95    clippy::semicolon_inside_block,
96    clippy::set_contains_or_insert,
97    clippy::shadow_unrelated,
98    clippy::significant_drop_in_scrutinee,
99    clippy::significant_drop_tightening,
100    clippy::single_option_map,
101    clippy::str_to_string,
102    clippy::string_add,
103    clippy::string_lit_as_bytes,
104    clippy::string_lit_chars_any,
105    clippy::string_slice,
106    clippy::suboptimal_flops,
107    clippy::suspicious_operation_groupings,
108    clippy::suspicious_xor_used_as_pow,
109    clippy::tests_outside_test_module,
110    clippy::todo,
111    clippy::too_long_first_doc_paragraph,
112    clippy::trailing_empty_array,
113    clippy::transmute_undefined_repr,
114    clippy::trivial_regex,
115    clippy::try_err,
116    clippy::undocumented_unsafe_blocks,
117    clippy::unimplemented,
118    clippy::uninhabited_references,
119    clippy::unnecessary_safety_comment,
120    clippy::unnecessary_safety_doc,
121    clippy::unnecessary_self_imports,
122    clippy::unnecessary_struct_initialization,
123    clippy::unused_peekable,
124    clippy::unused_result_ok,
125    clippy::unused_trait_names,
126    clippy::unwrap_in_result,
127    clippy::unwrap_used,
128    clippy::use_debug,
129    clippy::use_self,
130    clippy::useless_let_if_seq,
131    clippy::verbose_file_reads,
132    clippy::volatile_composites,
133    clippy::while_float,
134    clippy::wildcard_enum_match_arm,
135    ambiguous_negative_literals,
136    closure_returning_async_block,
137    future_incompatible,
138    impl_trait_redundant_captures,
139    let_underscore_drop,
140    macro_use_extern_crate,
141    meta_variable_misuse,
142    missing_copy_implementations,
143    missing_debug_implementations,
144    missing_docs,
145    redundant_lifetimes,
146    rust_2018_idioms,
147    single_use_lifetimes,
148    unit_bindings,
149    unnameable_types,
150    unreachable_pub,
151    unstable_features,
152    unused,
153    variant_size_differences
154)]
155
156#[doc(hidden)]
157pub mod private; // Not part of the public API.
158
159#[doc(inline)]
160pub use codegen::delegate;
161
162#[cfg(test)]
163#[doc(hidden)]
164mod used_only_in_benches {
165    use criterion as _;
166    use regex as _;
167}