eyre-rs / indenter Goto Github PK
View Code? Open in Web Editor NEWDisplay trait indentation helper for errors
License: Apache License 2.0
Display trait indentation helper for errors
License: Apache License 2.0
Hello ๐
I made another indenter but for a different use case: to indent code. This is useful when you want to output code in a build.rs
script for example. Particularly if the code generated is in an different language than Rust.
I already made the formatter struct there: https://github.com/cecton/code-formatter
Before I make yet another crate on crates.io, I thought maybe it would be nice to join effort. The downside for you is that it increases the original scope of your project because it indents & dedents, and also the use case is different (indenter
's use case is to format error messages while this one is to format code).
Let me know if you want to join effort. If you accept, I will update the documentation accordingly to include the bigger scope of this crate.
Hello!
I'm not sure I understand the split between std::io
and core::fmt
Write
, but it seems to me that this library would be useful for both traits. The io
trait seems more commonly used than fmt
.
Does it seem within scope of this library?
Cheers,
Louis
We're packaging this crate for Fedora Linux as a dependency of eyre and miette, and this came up during a routine review. The project doesn't include any license texts, but both the Apache-2.0 and MIT licenses require that a copy of the license terms is included in redistributed copies of the project.
Not having license texts included in the sources is a potential legal problem for Linux distributions, but arguably also for redistributing crate sources via crates.io.
That way CodeFormatter<'a, dyn fmt::Write>
is usable. This is trivial (bounds just need to gain : ?Sized
), non-breaking, and has no real downsides AFAICT.
The only reason this is an issue and not a PR is that it would have a merge conflict with #15, so I'll wait for that one to resolve either way first rather than having a mid-air collision with myself.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.