Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic in Buffer::store #3

Open
leontoeides opened this issue Mar 29, 2024 · 0 comments
Open

panic in Buffer::store #3

leontoeides opened this issue Mar 29, 2024 · 0 comments

Comments

@leontoeides
Copy link

Thank you for the great crate!

I have a panic originating from the eddie crate.

There's a get_unchecked_mut that's marked as unsafe in buffer.rs on line 26 causing a panic.

stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/47ecded3525392b77843534bed69b4302f9af8d2/library\std\src\panicking.rs:646
   1: core::panicking::panic_nounwind_fmt::runtime
             at /rustc/47ecded3525392b77843534bed69b4302f9af8d2/library\core\src\panicking.rs:110
   2: core::panicking::panic_nounwind_fmt
             at /rustc/47ecded3525392b77843534bed69b4302f9af8d2/library\core\src\panicking.rs:120
   3: core::panicking::panic_nounwind
             at /rustc/47ecded3525392b77843534bed69b4302f9af8d2/library\core\src\panicking.rs:152
   4: core::slice::index::impl$2::get_unchecked_mut::precondition_check
             at /rustc/47ecded3525392b77843534bed69b4302f9af8d2\library\core\src\ub_checks.rs:66
   5: core::slice::index::impl$2::get_unchecked_mut<char>
             at /rustc/47ecded3525392b77843534bed69b4302f9af8d2\library\core\src\slice\index.rs:236
   6: core::slice::impl$0::get_unchecked_mut<char,usize>
             at /rustc/47ecded3525392b77843534bed69b4302f9af8d2\library\core\src\slice\mod.rs:728
   7: eddie::utils::buffer::Buffer<char>::store<char,core::str::iter::Chars>
             at C:\Users\Dylan\.cargo\registry\src\index.crates.io-6f17d22bba15001f\eddie-0.4.2\src\utils\buffer.rs:26
   8: eddie::str::leven::Levenshtein::similarity
             at C:\Users\Dylan\.cargo\registry\src\index.crates.io-6f17d22bba15001f\eddie-0.4.2\src\str\leven.rs:118
   9: indicium::simple::internal::eddie::autocomplete::context_levenshtein::impl$0::eddie_autocomplete_context_levenshtein::closure$2<usize>
             at .\src\simple\internal\eddie\autocomplete\context_levenshtein.rs:70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant