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

Won't compile without battery feature #1508

Closed
xaocon opened this issue Jul 24, 2020 · 0 comments · Fixed by #1509
Closed

Won't compile without battery feature #1508

xaocon opened this issue Jul 24, 2020 · 0 comments · Fixed by #1509
Labels
🐛 bug Something isn't working as expected.

Comments

@xaocon
Copy link

xaocon commented Jul 24, 2020

This doesn't open in the correct browser and is not specific to my configuration

Bug Report

Current Behavior

Building without battery feature fails because of an incorrectly sized CONST array. Problem comes from the lines:

    #[cfg(feature = "battery")]
    "battery",

Expected Behavior

You should be able to build without the feature if the feature is going to exist

Additional context/Screenshots

error[E0308]: mismatched types
  --> src/configs/starship_root.rs:14:38
   |
14 |   pub const PROMPT_ORDER: [&str; 44] = [
   |  ______________________________________^
15 | |     "username",
16 | |     "hostname",
17 | |     "singularity",
...  |
62 | |     "character",
63 | | ];
   | |_^ expected an array with a fixed size of 44 elements, found one with 43 elements

Possible Solution

Set a CONST for size somewhere before this based on the battery feature. This will probably be useful in the future if more modules become features.

Environment

  • Starship version: current master
@xaocon xaocon added the 🐛 bug Something isn't working as expected. label Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working as expected.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant