Comments (7)
It may be useful but currently I do not have the use case and time. Maybe you can set a "flag" as default value?
from unhtml.rs.
@Hexilee That's certainly a possibility. Would you accept a PR if I created one? I'd certainly take a look at the code if you would!
from unhtml.rs.
PR is welcome! I will take some time to review the code and make the decision.
from unhtml.rs.
@Hexilee Looking through things now; it appears as though the only two errors that can be returned are SourceNotFound
and SourceEmpty
. If this is correct, would you agree that the appropriate thing to do is to cast both of them to an Option
?
If that's the correct course of action, I actually think this should be as simple as calling .ok()
on the result, as we're disregarding both possible errors.
from unhtml.rs.
The purpose to use Result
instead of Option
is debugging more conveniently. Maybe you can use Option
and log the err.
from unhtml.rs.
@jhpratt Option<T>
is supported in v0.7, documentation will be updated in few days, you can refer to the test compound.rs now.
from unhtml.rs.
I will close this issue
from unhtml.rs.
Related Issues (8)
- Getting an Integer out of a multiline `inner` HOT 3
- Stable rust supported? HOT 2
- unhtml::VecFromHtml missing HOT 4
- Release unhtml to crates to update scraper to 0.12 HOT 2
- Zero-copy/ borrow support HOT 3
- Implement `FromHtml` in terms of `from_html_ref`, not `from_html` HOT 5
- Selector with comma support HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unhtml.rs.