Skip to content

Fix return default on non-existing key - #2967

Merged
jwortmann merged 1 commit into
sublimelsp:mainfrom
asl97:patch-1
Jun 23, 2026
Merged

jwortmann merged 1 commit into
sublimelsp:mainfrom
asl97:patch-1

Conversation

@asl97

@asl97 asl97 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Fixes sublimelsp/LSP-rust-analyzer#218

Feel free to edit as require for style/lint.

I left the current = current.get(key) alone as I am not sure if changing that to current = current[key] would be considered as unrelated changes.

This keep the return None if the value is actually an None value instead of replacing with default as per previous function, pre-7981a13

@jwortmann

Copy link
Copy Markdown
Member

Makes sense. I'd say the suggested current[key] change instead of current.get(key) would be preferred now.

@asl97

asl97 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Replaced current.get(key) with current[key] as recommend.

@jwortmann
jwortmann merged commit e5d80e2 into sublimelsp:main Jun 23, 2026
9 checks passed
@jwortmann

Copy link
Copy Markdown
Member

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.

Latest release broken

2 participants