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

Replace == nothing by === nothing #1141

Merged
merged 1 commit into from
Jun 29, 2023
Merged

Conversation

lgoettgens
Copy link
Contributor

No description provided.

@thofma
Copy link
Owner

thofma commented Jun 27, 2023

What is the reason for this change? The binary version is much more readable and with === replaced by == faster than isnothing (across all julia version >= 1.6).

@fieker
Copy link
Collaborator

fieker commented Jun 27, 2023 via email

@lgoettgens lgoettgens changed the title Replace == nothing by isnothing Replace == nothing by === nothing Jun 27, 2023
@lgoettgens
Copy link
Contributor Author

Comparing against nothing with ===/!== instead of ==/!= is a recommended change by the Julia linter in VSCode.

Sorry for the isnothing stuff in the first version of this. Using === nothing and isnothing seems to be a personal style of code, and it wasn't my intention to debate that here.

@thofma
Copy link
Owner

thofma commented Jun 27, 2023

Thanks for the adjustment. (https://docs.julialang.org/en/v1.6/manual/performance-tips/#Checking-for-equality-with-a-singleton is the reference for the === nothing vs isnothing difference on some older julia versions, which we still support).

@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Patch coverage: 73.91% and project coverage change: -0.13 ⚠️

Comparison is base (e0986b7) 69.51% compared to head (215c044) 69.38%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1141      +/-   ##
==========================================
- Coverage   69.51%   69.38%   -0.13%     
==========================================
  Files         349      349              
  Lines      113018   113018              
==========================================
- Hits        78562    78416     -146     
- Misses      34456    34602     +146     
Impacted Files Coverage Δ
src/AlgAssAbsOrd/NEQ.jl 0.00% <0.00%> (ø)
src/Grp/Morphisms.jl 78.57% <0.00%> (ø)
src/GrpAb/GrpAbFinGen.jl 73.89% <0.00%> (-0.10%) ⬇️
src/NumField/NfAbs/MPolyGcd.jl 68.83% <0.00%> (ø)
src/QuadForm/Quad/ZLattices.jl 92.78% <50.00%> (-0.74%) ⬇️
src/AlgAssAbsOrd/Conjugacy/Conjugacy.jl 98.32% <100.00%> (ø)
src/EllCrv/Periods.jl 93.47% <100.00%> (ø)
src/GrpAb/Lattice.jl 84.78% <100.00%> (ø)
src/Misc/Integer.jl 50.78% <100.00%> (ø)
src/NumField/NfAbs/NormRelation/SUnits.jl 64.59% <100.00%> (ø)
... and 5 more

... and 30 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@thofma thofma merged commit 7b06fea into thofma:master Jun 29, 2023
13 of 16 checks passed
@lgoettgens lgoettgens deleted the lg/nothing branch June 29, 2023 08:37
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.

3 participants