Comments (5)
Aaah I see, fair enough. Consider the review finished in that case :)
from ico-builder.
from ico-builder.
- Derive
Deref
andDerefMut
forIconSizes
and remove the.0
fromsizes.0
- IMO these lines violate the SRP and should be in their own function
- Replace the
PathBuf::push
call withlet output_path: PathBuf = [out_dir, file_name].iter().collect();
, see the docs - Replace the
.unwrap
calls with.expect
with a nice message - Rename
buf
tobuffer
- Move the example in the docs to an actual example
- What happens when the input images are not squares?
- Reduce code duplication by making
add_source_file
calladd_source_files
-
IconSizes::new
requires'static
input, limiting its usefulness in e.g. GUIs with user input. It uses aCow
internally, so this is unnecessary
from ico-builder.
Thaaanks so much for your review ❤️. You indeed caught some things I have missed :)
I have addressed most of the comments and checked them off the list.
Derive
Deref
andDerefMut
forIconSizes
and remove the.0
fromsizes.0
.
I can only implement Deref
as my underlying Cow might be a non-mutable reference :)
IconSizes::new
requires'static
input, limiting its usefulness in e.g. GUIs with user input. It uses aCow
internally, so this is unnecessary
I only need the Cow
so that I can create IconSizes
in const contexts. In that case 'static
is indeed required.
If you have non-static data, you can use this From
impl:
impl<'a, I> From<I> for IconSizes
where
I: IntoIterator<Item = &'a u32>
from ico-builder.
Oh, I forgot to close this :) Thanks again for the review ❤
from ico-builder.
Related Issues (1)
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 ico-builder.