mirror of
https://gitee.com/openharmony/third_party_rust_nom
synced 2024-11-23 07:29:54 +00:00
specify the syntax highlight to code snippet in error doc
This commit is contained in:
parent
e1cf43a6fc
commit
8ab6827c2d
@ -316,7 +316,7 @@ struct DebugError {
|
|||||||
|
|
||||||
Now let's implement `ParseError` and `ContextError` on it:
|
Now let's implement `ParseError` and `ContextError` on it:
|
||||||
|
|
||||||
```
|
```rust
|
||||||
impl ParseError<&str> for DebugError {
|
impl ParseError<&str> for DebugError {
|
||||||
// on one line, we show the error code and the input that caused it
|
// on one line, we show the error code and the input that caused it
|
||||||
fn from_error_kind(input: &str, kind: ErrorKind) -> Self {
|
fn from_error_kind(input: &str, kind: ErrorKind) -> Self {
|
||||||
|
Loading…
Reference in New Issue
Block a user