Use references for Export binding type (#3853)

This commit is contained in:
Charlie Marsh 2023-04-03 11:26:42 -04:00 committed by GitHub
parent 924bebbb4a
commit 25771cd4b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 65 additions and 62 deletions

View file

@ -207,9 +207,9 @@ pub struct StarImportation<'a> {
// FutureImportation
#[derive(Clone, Debug)]
pub struct Export {
pub struct Export<'a> {
/// The names of the bindings exported via `__all__`.
pub names: Vec<String>,
pub names: Vec<&'a str>,
}
#[derive(Clone, Debug)]
@ -258,7 +258,7 @@ pub enum BindingKind<'a> {
Builtin,
ClassDefinition,
FunctionDefinition,
Export(Export),
Export(Export<'a>),
FutureImportation,
Importation(Importation<'a>),
FromImportation(FromImportation<'a>),