Skip to content

byte index 129 is not a char boundary; it is inside '\u{200b}' #56

Closed
@152334H

Description

@152334H
$ RUST_BACKTRACE=1 leetcode p 1653

[1653] Minimum Deletions to Make String Balanced is on the run...


thread 'main' panicked at 'byte index 129 is not a char boundary; it is inside '\u{200b}' (bytes 127..130) of `<p>You are given a string <code>s</code> consisting only of characters <code>&#39;a&#39;</code> and <code>&#39;b&#39;</code>​​​​.</p>

<p>You can delete any number of characters in <code>s</code> to make <code>s</code> <strong>balanced</strong>. <c`[...]', /home/throwaway/.cargo/registry/src/github.com-1ecc6299db9ec823/leetcode-cli-0.3.10/src/helper.rs:183:58
stack backtrace:
   0: rust_begin_unwind
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:517:5
   1: core::panicking::panic_fmt
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/panicking.rs:101:14
   2: core::str::slice_error_fail
   3: <alloc::string::String as leetcode_cli::helper::html::HTML>::ser
   4: <alloc::string::String as leetcode_cli::helper::html::HTML>::render
   5: <leetcode_cli::cache::models::Question as core::fmt::Display>::fmt
   6: core::fmt::write
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/fmt/mod.rs:1150:17
   7: std::io::Write::write_fmt
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/io/mod.rs:1667:15
   8: <&std::io::stdio::Stdout as std::io::Write>::write_fmt
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/io/stdio.rs:852:9
   9: <std::io::stdio::Stdout as std::io::Write>::write_fmt
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/io/stdio.rs:826:9
  10: std::io::stdio::print_to
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/io/stdio.rs:1192:21
  11: std::io::stdio::_print
             at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/io/stdio.rs:1205:5
  12: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  14: tokio::macros::scoped_tls::ScopedKey<T>::set
  15: tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on
  16: tokio::runtime::context::enter
  17: tokio::runtime::handle::Handle::enter
  18: leetcode::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Problem link here. The \u200b characters appear right before the first closing p tag in the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions