Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iface: remove generic T: [u8] in functions #810

Merged
merged 1 commit into from
Jul 4, 2023

Conversation

thvdveld
Copy link
Contributor

@thvdveld thvdveld commented Jul 4, 2023

Removing the generic reduces the code size and I don't think we actually need it in the interface.

Removing the generic reduces the code size and I don't think we actually
need it in the interface.

Signed-off-by: Thibaut Vandervelden <[email protected]>
@thvdveld
Copy link
Contributor Author

thvdveld commented Jul 4, 2023

With generics:

   Compiling smoltcp v0.10.0 (/home/thvdveld/source/vub/smoltcp)
    Finished release [optimized + debuginfo] target(s) in 3.56s
   text	  data	   bss	   dec	   hex	filename
1490502	 84032	   536	1575070	18089e	server

Without generics:

   Compiling smoltcp v0.10.0 (/home/thvdveld/source/vub/smoltcp)
    Finished release [optimized + debuginfo] target(s) in 9.13s
   text	  data	   bss	   dec	   hex	filename
1480146	 83072	   536	1563754	17dc6a	server

@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Merging #810 (ad3f387) into main (a684195) will not change coverage.
The diff coverage is 85.00%.

@@           Coverage Diff           @@
##             main     #810   +/-   ##
=======================================
  Coverage   79.65%   79.65%           
=======================================
  Files          72       72           
  Lines       27862    27862           
=======================================
  Hits        22193    22193           
  Misses       5669     5669           
Impacted Files Coverage Δ
src/iface/interface/mod.rs 49.62% <50.00%> (ø)
src/iface/interface/ethernet.rs 91.48% <100.00%> (ø)
src/iface/interface/ieee802154.rs 88.75% <100.00%> (ø)
src/iface/interface/ipv4.rs 68.50% <100.00%> (ø)
src/iface/interface/ipv6.rs 91.38% <100.00%> (ø)
src/iface/interface/sixlowpan.rs 74.93% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Dirbaio
Copy link
Member

Dirbaio commented Jul 4, 2023

woah, 10kb less??

@thvdveld
Copy link
Contributor Author

thvdveld commented Jul 4, 2023

Looks like it, yes!

@Dirbaio Dirbaio added this pull request to the merge queue Jul 4, 2023
Merged via the queue into smoltcp-rs:main with commit 7ff1364 Jul 4, 2023
@thvdveld thvdveld deleted the remove-generic-T branch July 4, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants