Skip to content

Expose info() api#190

Open
olalonde wants to merge 1 commit into
chyh1990:masterfrom
olalonde:main
Open

Expose info() api#190
olalonde wants to merge 1 commit into
chyh1990:masterfrom
olalonde:main

Conversation

@olalonde
Copy link
Copy Markdown

Add a function that exposes the info value. This is needed since description() is deprecated.

@hoodie
Copy link
Copy Markdown
Contributor

hoodie commented Jul 14, 2022

If I understand this correctly this always gives you the same message as ScanError::to_string(). Is it really necessary to have it then?

@olalonde
Copy link
Copy Markdown
Author

Not exactly the same:

"mapping values are not allowed in this context at line 4 column 4" (to_string())
"mapping values are not allowed in this context" (info())

Personally, it would help me because I use yaml-rust to parse a section of a larger file so the column/line info is wrong from the perspective of the end user. Right now, I trim the message I receive from to_string but that's not very elegant.

@olalonde
Copy link
Copy Markdown
Author

@hoodie are you a maintainer of yaml-rust? I was under the impression it was unmaintained.

@hoodie
Copy link
Copy Markdown
Contributor

hoodie commented Jul 14, 2022

I am not, just reading along, because I contributed a little in the past. I don't think it's unmaintained, but the maintainer seldomly checks the PRs.

@olalonde
Copy link
Copy Markdown
Author

Ok well, the last commit was a year ago... That's pretty seldom indeed.

Ethiraric added a commit to Ethiraric/yaml-rust2 that referenced this pull request Aug 17, 2023
@davvid
Copy link
Copy Markdown

davvid commented Jan 29, 2024

FWIW I've merged this into my fork: https://github.com/davvid/yaml-rust

Ethiraric added a commit to saphyr-rs/saphyr that referenced this pull request Oct 2, 2024
Ethiraric added a commit to saphyr-rs/saphyr that referenced this pull request Oct 2, 2024
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

Successfully merging this pull request may close these issues.

3 participants