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

feature: access underlying IngredientImpl in interned structs #623

Conversation

davidbarsky
Copy link
Contributor

(Builds atop of #620 and #618).

This PR adds the ability to fetch interned data from the Salsa database by simply knowing the name of the interned struct and the corresponding ID. For example:

#[salsa::interned_sans_lifetime(id = salsa::Id)]
struct InternedString {
    data: String
}

let s1 = InternedString::new(db, "Hello, world!");

// later...

let interned_s1 = InternedString::ingredient(&db).fields(&db, s1).0;

Copy link

netlify bot commented Dec 11, 2024

Deploy Preview for salsa-rs canceled.

Name Link
🔨 Latest commit 1612f16
🔍 Latest deploy log https://app.netlify.com/sites/salsa-rs/deploys/6761984c22032e00081d5861

Copy link

codspeed-hq bot commented Dec 11, 2024

CodSpeed Performance Report

Merging #623 will not alter performance

Comparing davidbarsky:davidbarsky/access-underlying-ingredientimpl-in-interned-structs (1612f16) with master (3c7f169)

Summary

✅ 9 untouched benchmarks

@davidbarsky davidbarsky changed the title Davidbarsky/access underlying ingredientimpl in interned structs feature: access underlying IngredientImpl in interned structs Dec 11, 2024
@davidbarsky davidbarsky force-pushed the davidbarsky/access-underlying-ingredientimpl-in-interned-structs branch from 8ffabf7 to fae3db6 Compare December 11, 2024 14:55
@davidbarsky davidbarsky force-pushed the davidbarsky/access-underlying-ingredientimpl-in-interned-structs branch from fae3db6 to 1612f16 Compare December 17, 2024 15:27
@davidbarsky
Copy link
Contributor Author

Closed in favor of #632.

@davidbarsky davidbarsky deleted the davidbarsky/access-underlying-ingredientimpl-in-interned-structs branch December 18, 2024 21:58
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.

1 participant