Skip to content

FrameInfo builder#99

Merged
PSeitz merged 2 commits intoPSeitz:mainfrom
CosmicHorrorDev:frame-info-builder
Apr 6, 2023
Merged

FrameInfo builder#99
PSeitz merged 2 commits intoPSeitz:mainfrom
CosmicHorrorDev:frame-info-builder

Conversation

@CosmicHorrorDev
Copy link
Contributor

This adds in fluent API style contruction for FrameInfo. Now you can do

let info = FrameInfo::new()
    .block_size(BlockSize::Max1MB)
    .content_checksum(true);

IMO it reads better, but it also has the benefit of making it easier to see when the returned FrameInfo is unused through avoiding mutability. E.g this wouldn't get picked up as unused

let mut info = FrameInfo::new();
info.content_checksum = true;

@codecov
Copy link

codecov bot commented Apr 4, 2023

Codecov Report

Merging #99 (a8baba2) into main (be2ea76) will decrease coverage by 0.99%.
The diff coverage is 11.53%.

@@            Coverage Diff             @@
##             main      #99      +/-   ##
==========================================
- Coverage   89.39%   88.41%   -0.99%     
==========================================
  Files          11       11              
  Lines        2179     2192      +13     
==========================================
- Hits         1948     1938      -10     
- Misses        231      254      +23     
Impacted Files Coverage Δ
src/frame/header.rs 79.74% <11.53%> (-9.10%) ⬇️

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@PSeitz PSeitz merged commit 0293879 into PSeitz:main Apr 6, 2023
@PSeitz
Copy link
Owner

PSeitz commented Apr 6, 2023

Thanks!

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.

2 participants