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

feat: supports multiline usecrate #12

Open
sor4chi opened this issue Jul 15, 2024 · 0 comments · May be fixed by #13
Open

feat: supports multiline usecrate #12

sor4chi opened this issue Jul 15, 2024 · 0 comments · May be fixed by #13

Comments

@sor4chi
Copy link

sor4chi commented Jul 15, 2024

In the current version, a single line with use crate::(.*);$ such as:

use crate::submod1;

is processed correctly. However, in the case of a multi-line use crate statement like:

use crate::{
  submod1,
  submod2
};

it cannot be converted. This is likely because the current implementation only processes single-line use crate statements in here.

static ref USECRATE_RE: Regex = source_line_regex(r" use crate::(?P<submod>.*);$").unwrap();

@sor4chi sor4chi linked a pull request Jul 15, 2024 that will close this issue
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 a pull request may close this issue.

1 participant