Skip to content

Commit 4013a2f

Browse files
authored
Merge branch 'main' into debounce-reloading
2 parents 0707555 + 0a0112a commit 4013a2f

File tree

13 files changed

+346
-193
lines changed

13 files changed

+346
-193
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Updated help page to only show kitty keybindings when you're actually using kitty
88
- Map page-up and page-down keybindings to do the same thing as up-key and down-key (thanks [@maxdexh](https://github.com/maxdexh)!)
99
- Vertically center pages within the available space if they are not constrained by the height (thanks [@maxdexh](https://github.com/maxdexh)!)
10+
- Fixed issue with cooked mode not being restored upon panic/error (thanks [@maxdexh](https://github.com/maxdexh)!)
1011

1112

1213
# v0.4.3

Cargo.lock

Lines changed: 11 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 132 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ xflags = "0.4.0-pre.2"
3939
mimalloc = "0.1.43"
4040
nix = { version = "0.30.0", features = ["signal"] }
4141
mupdf = { git = "https://github.com/messense/mupdf-rs.git", rev = "2e0fae910fac8048c7008211fc4d3b9f5d227a07", default-features = false, features = ["svg", "system-fonts", "img"] }
42-
rayon = { version = "*", default-features = false }
42+
rayon = { version = "1", default-features = false }
4343
# kittage = { path = "../kittage/", features = ["crossterm-tokio", "image-crate", "log"] }
4444
kittage = { git = "https://github.com/itsjunetime/kittage.git", features = ["crossterm-tokio", "image-crate", "log"] }
45-
memmap2 = "*"
45+
memmap2 = "0"
4646
csscolorparser = { version = "0.8.0", default-features = false }
4747

4848
# logging
@@ -76,90 +76,205 @@ name = "for_profiling"
7676
path = "./benches/for_profiling.rs"
7777

7878
[lints.clippy]
79-
uninlined_format_args = "warn"
80-
redundant_closure_for_method_calls = "warn"
81-
cast_lossless = "warn"
82-
single_char_pattern = "warn"
83-
manual_let_else = "warn"
84-
ignored_unit_patterns = "warn"
85-
range_plus_one = "warn"
86-
unreadable_literal = "warn"
87-
redundant_else = "warn"
79+
alloc_instead_of_core = "warn"
80+
allow_attributes = "warn"
81+
as_pointer_underscore = "warn"
82+
as_ptr_cast_mut = "warn"
83+
as_underscore = "warn"
8884
assigning_clones = "warn"
85+
assertions_on_result_states = "warn"
8986
bool_to_int_with_if = "warn"
9087
borrow_as_ptr = "warn"
88+
branches_sharing_code = "warn"
89+
cargo_common_metadata = "warn"
90+
case_sensitive_file_extension_comparisons = "warn"
91+
cast_lossless = "warn"
9192
cast_ptr_alignment = "warn"
93+
cfg_not_test = "warn"
9294
checked_conversions = "warn"
95+
clear_with_drain = "warn"
96+
cloned_instead_of_copied = "warn"
97+
coerce_container_to_any = "warn"
98+
comparison_chain = "warn"
9399
copy_iterator = "warn"
100+
create_dir = "warn"
101+
debug_assert_with_mut_call = "warn"
102+
decimal_literal_representation = "warn"
94103
default_trait_access = "warn"
104+
deref_by_slicing = "warn"
105+
doc_broken_link = "warn"
106+
doc_link_code = "warn"
95107
doc_link_with_quotes = "warn"
108+
elidable_lifetime_names = "warn"
109+
empty_drop = "warn"
96110
empty_enums = "warn"
111+
empty_enum_variants_with_brackets = "warn"
112+
empty_structs_with_brackets = "warn"
113+
equatable_if_let = "warn"
114+
error_impl_error = "warn"
115+
expl_impl_clone_on_copy = "warn"
116+
explicit_deref_methods = "warn"
97117
explicit_into_iter_loop = "warn"
98118
explicit_iter_loop = "warn"
119+
fallible_impl_from = "warn"
120+
filetype_is_file = "warn"
99121
filter_map_next = "warn"
100122
flat_map_option = "warn"
123+
fn_to_numeric_cast_any = "warn"
101124
fn_params_excessive_bools = "warn"
102-
from_iter_instead_of_collect = "warn"
125+
format_collect = "warn"
126+
format_push_string = "warn"
127+
get_unwrap = "warn"
128+
if_then_some_else_none = "warn"
129+
ignore_without_reason = "warn"
130+
ignored_unit_patterns = "warn"
103131
implicit_clone = "warn"
132+
imprecise_flops = "warn"
104133
index_refutable_slice = "warn"
105-
inefficient_to_string = "warn"
134+
indexing_slicing = "allow" # can't warn on this cause we basically have to do indexing for some ratatui apis
135+
infinite_loop = "warn"
106136
invalid_upcast_comparisons = "warn"
137+
ip_constant = "warn"
107138
iter_filter_is_ok = "warn"
108139
iter_filter_is_some = "warn"
109140
iter_not_returning_iterator = "warn"
141+
iter_on_empty_collections = "warn"
142+
iter_on_single_items = "warn"
143+
large_digit_groups = "warn"
110144
large_futures = "warn"
111-
large_stack_arrays = "warn"
145+
large_include_file = "warn"
146+
large_stack_frames = "warn"
112147
large_types_passed_by_value = "warn"
113148
linkedlist = "warn"
149+
literal_string_with_formatting_args = "warn"
150+
lossy_float_literal = "warn"
114151
macro_use_imports = "warn"
115152
manual_assert = "warn"
116153
manual_instant_elapsed = "warn"
117154
manual_is_power_of_two = "warn"
118155
manual_is_variant_and = "warn"
156+
manual_let_else = "warn"
157+
manual_midpoint = "warn"
119158
manual_ok_or = "warn"
120-
manual_string_new = "warn"
121159
many_single_char_names = "warn"
122-
manual_unwrap_or = "warn"
160+
map_err_ignore = "warn"
161+
map_unwrap_or = "warn"
162+
map_with_unused_argument_over_ranges = "warn"
123163
match_same_arms = "warn"
164+
match_wild_err_arm = "warn"
124165
match_wildcard_for_single_variants = "warn"
125166
maybe_infinite_iter = "warn"
167+
mem_forget = "warn"
126168
mismatching_type_param_order = "warn"
169+
missing_assert_message = "warn"
127170
missing_fields_in_debug = "warn"
171+
mixed_read_write_in_expression = "warn"
172+
multiple_unsafe_ops_per_block = "warn"
173+
must_use_candidate = "warn"
128174
mut_mut = "warn"
175+
mutex_atomic = "warn"
176+
mutex_integer = "warn"
177+
naive_bytecount = "warn"
129178
needless_bitwise_bool = "warn"
179+
needless_collect = "warn"
130180
needless_continue = "warn"
131181
needless_for_each = "warn"
182+
needless_pass_by_ref_mut = "warn"
132183
needless_pass_by_value = "warn"
133184
needless_raw_string_hashes = "warn"
185+
needless_raw_strings = "warn"
186+
negative_feature_names = "warn"
134187
no_effect_underscore_binding = "warn"
135188
no_mangle_with_rust_abi = "warn"
189+
non_send_fields_in_send_ty = "warn"
190+
non_std_lazy_statics = "warn"
191+
non_zero_suggestions = "warn"
192+
nonstandard_macro_braces = "warn"
136193
option_as_ref_cloned = "warn"
137194
option_option = "warn"
195+
or_fun_call = "warn"
196+
path_buf_push_overwrite = "warn"
197+
pathbuf_init_then_push = "warn"
198+
precedence_bits = "warn"
138199
ptr_as_ptr = "warn"
139200
ptr_cast_constness = "warn"
201+
pub_underscore_fields = "warn"
202+
pub_without_shorthand = "warn"
140203
range_minus_one = "warn"
204+
range_plus_one = "warn"
205+
rc_buffer = "warn"
206+
rc_mutex = "warn"
207+
read_zero_byte_vec = "warn"
208+
redundant_clone = "warn"
209+
redundant_closure_for_method_calls = "warn"
210+
redundant_else = "warn"
211+
redundant_pub_crate = "warn"
212+
redundant_test_prefix = "warn"
141213
ref_as_ptr = "warn"
142214
ref_binding_to_reference = "warn"
143215
ref_option = "warn"
144216
ref_option_ref = "warn"
217+
rest_pat_in_fully_bound_structs = "warn"
145218
return_self_not_must_use = "warn"
146219
same_functions_in_if_condition = "warn"
220+
self_named_module_files = "warn"
221+
semicolon_if_nothing_returned = "warn"
222+
semicolon_inside_block = "warn"
147223
should_panic_without_expect = "warn"
148-
similar_names = "warn"
224+
significant_drop_in_scrutinee = "warn" # I thought this was fixed in the 2024 edition. watever
225+
significant_drop_tightening = "warn"
226+
single_char_pattern = "warn"
227+
single_option_map = "warn"
149228
stable_sort_primitive = "warn"
150229
str_split_at_newline = "warn"
230+
string_lit_as_bytes = "warn"
231+
string_lit_chars_any = "warn"
232+
string_slice = "warn"
151233
struct_excessive_bools = "warn"
152234
struct_field_names = "warn"
235+
suboptimal_flops = "warn"
236+
suspicious_operation_groupings = "warn"
237+
suspicious_xor_used_as_pow = "warn"
238+
tests_outside_test_module = "warn"
239+
trait_duplication_in_bounds = "warn"
153240
transmute_ptr_to_ptr = "warn"
241+
trivial_regex = "warn"
154242
trivially_copy_pass_by_ref = "warn"
243+
try_err = "warn"
244+
tuple_array_conversions = "warn"
245+
type_repetition_in_bounds = "warn"
246+
unchecked_time_subtraction = "warn"
247+
undocumented_unsafe_blocks = "warn"
155248
unicode_not_nfc = "warn"
249+
uninhabited_references = "warn"
250+
uninlined_format_args = "warn"
156251
unnecessary_box_returns = "warn"
252+
unnecessary_debug_formatting = "warn"
157253
unnecessary_join = "warn"
158254
unnecessary_literal_bound = "warn"
255+
unnecessary_safety_comment = "warn"
256+
unnecessary_safety_doc = "warn"
257+
unnecessary_self_imports = "warn"
258+
unnecessary_semicolon = "warn"
259+
unnecessary_struct_initialization = "warn"
159260
unnecessary_wraps = "warn"
160261
unnested_or_patterns = "warn"
262+
unreadable_literal = "warn"
263+
unsafe_derive_deserialize = "warn"
161264
unused_async = "warn"
265+
unused_peekable = "warn"
266+
unused_result_ok = "warn"
267+
unused_rounding = "warn"
162268
unused_self = "warn"
269+
unused_trait_names = "warn"
270+
use_self = "warn"
163271
used_underscore_binding = "warn"
164272
used_underscore_items = "warn"
273+
useless_let_if_seq = "warn"
274+
verbose_bit_mask = "warn"
275+
verbose_file_reads = "warn"
276+
volatile_composites = "warn"
277+
while_float = "warn"
278+
wildcard_dependencies = "warn"
279+
wildcard_imports = "warn"
165280
zero_sized_map_values = "warn"

benches/for_profiling.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use ratatui_image::picker::ProtocolType;
2+
13
mod utils;
24

35
const BLACK: i32 = 0;
@@ -12,5 +14,5 @@ async fn main() {
1214
.nth(1)
1315
.expect("Please enter a file to profile");
1416

15-
utils::render_doc(file, None, BLACK, WHITE).await;
17+
utils::render_doc(file, None, BLACK, WHITE, ProtocolType::Kitty).await;
1618
}

0 commit comments

Comments
 (0)