Use more rust syntactic sugar
ClosedPublic

Authored by ognarb on Oct 31 2018, 11:53 PM.

Details

Summary

Add some nice rust syntactic sugar

Test Plan

All the tests still pass

Diff Detail

Repository
R881 Rust Qt Binding Generator
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 4408
Build 4426: arc lint + arc unit
ognarb requested review of this revision.Oct 31 2018, 11:53 PM
ognarb created this revision.
ognarb updated this revision to Diff 44600.Nov 1 2018, 12:55 AM

More small syntax change

ognarb retitled this revision from Use pattern matching instead of if and else that return true and false to Use more rust syntactic sugar.Nov 1 2018, 12:56 AM
ognarb edited the summary of this revision. (Show Details)
ognarb edited the test plan for this revision. (Show Details)
vandenoever requested changes to this revision.Nov 1 2018, 7:20 AM

Nice work, Carl.

I've marked some small things that could improve.

Do you have commit access?

src/configuration.rs
271–275

Good catch!

356

Now t can go too.

src/cpp.rs
2

generate -> generates

214

rustfmt does not break this line?

src/rust.rs
2

generate -> generates

This revision now requires changes to proceed.Nov 1 2018, 7:20 AM
ognarb updated this revision to Diff 44610.Nov 1 2018, 9:31 AM
ognarb marked 2 inline comments as done.

Fix gramar error and apply some rustfmt change

ognarb added a comment.Nov 1 2018, 9:33 AM

Nice work, Carl.

Thanks :)

Do you have commit access?

Yes

src/configuration.rs
356

No t is needed in the line 354 &t

src/cpp.rs
214

rustfmt does break this line, but also create a lot more change.

vandenoever accepted this revision.Nov 1 2018, 10:16 AM

Looks good. Thanks and welcome to Rust Qt Binding Generator.

This revision is now accepted and ready to land.Nov 1 2018, 10:16 AM
This revision was automatically updated to reflect the committed changes.