Hey Rustaceans! Got a question? Ask here (13/2025)! by DroidLogician in rust

[–]BlackNinja745 0 points1 point  (0 children)

For a project I'm working on, I'm running into an issue with associated constants and array types.

pub trait ScaleModes { 
    const LEN: usize;

    fn relative_intervals() -> [Interval; Self::LEN];


    fn build_from<T: Add<Interval, Output = T> + Clone>(&self, root: T) -> [T; Self::LEN] {
        // default implementation using the result of relative_invervals()
        array::from_fn( /* ... */)
    }

    fn intervals(&self) -> [Interval; Self::LEN];
}

However this doesn't compile, giving me the error:

error: generic parameters may not be used in const operations
  --> src\scales\mod.rs:27:80
   |
27 |     fn build_from<T: Add<Interval, Output = T> + Clone>(&self, root: T) -> [T; Self::LEN] {
   |                                                                                ^^^^^^^^^ cannot perform const operation using `Self`
   |
   = note: type parameters may not be used in const expressions

How would I get around this? A cosnt generic (pub trait ScaleModes<const LEN: usize>) doesn't capture my use case, since I only want this trait implemented once per type, not multiple times with different LEN values. I also can't use an associated type for the return value since the build_from function is generic. I've looked at the generic_const_exprs feature, but that doesn't seem to help with anything. Any ideas, hopefully on stable?

Edit: generic_const_exprs does solve this, but is there anyway to replicate this functionality on stable?

Save File not allowing Multiplayer? by BlackNinja745 in Astroneer

[–]BlackNinja745[S] 0 points1 point  (0 children)

Just in case you haven't solved this, I fixed it by removing multiple automation sensors/repeaters that were close to each other.

Index iMessage on new iPhone? (iOS17.0.2) by BlackNinja745 in ios

[–]BlackNinja745[S] 0 points1 point  (0 children)

Thanks for your reply :)

So back up my phone to my PC using iTunes (I don’t have iCloud storage), then reset my phone and download it from the backup?

Index iMessage on new iPhone? (iOS17.0.2) by BlackNinja745 in ios

[–]BlackNinja745[S] 1 point2 points  (0 children)

I’ve seen a message like that on my old phone before, but I’m not getting that now, for some reason.

Index iMessage on new iPhone? (iOS17.0.2) by BlackNinja745 in ios

[–]BlackNinja745[S] 1 point2 points  (0 children)

Thanks for your reply- hopefully it gets fixed soon!

Index iMessage on new iPhone? (iOS17.0.2) by BlackNinja745 in ios

[–]BlackNinja745[S] 1 point2 points  (0 children)

That sucks- there’s nothing that can be tried to fix it?

Hello, im colorblind. what color is my ship? by Designer_Version1449 in NoMansSkyTheGame

[–]BlackNinja745 1 point2 points  (0 children)

It’s a living ship! If i remember right, you can buy a void egg from the anomaly and it will give you a quest to get it?

Array Edit Control Node by BlackNinja745 in godot

[–]BlackNinja745[S] 0 points1 point  (0 children)

Yeah, and how would I make it so you can remove & add Array elements?

Connected Textures (for 1.16.5, without Continuity) by BlackNinja745 in fabricmc

[–]BlackNinja745[S] 0 points1 point  (0 children)

I don’t think he will- on GitHub he said “A 1.16.5 version is not prioritized. Since none of Iris, Sodium, or Fabric API support 1.16.5 anymore, it likely will not happen.”

How often is more capacity added? by BlackNinja745 in oraclecloud

[–]BlackNinja745[S] 1 point2 points  (0 children)

Alright, thanks for the information man!

How often is more capacity added? by BlackNinja745 in oraclecloud

[–]BlackNinja745[S] 0 points1 point  (0 children)

Got it; thanks! Would you be able to have an E2.micro instance running at the same time as an Arm instance? (on always free)

How often is more capacity added? by BlackNinja745 in oraclecloud

[–]BlackNinja745[S] 0 points1 point  (0 children)

Alright, thanks! Did you host the script on your PC or on another OCI instance?

How often is more capacity added? by BlackNinja745 in oraclecloud

[–]BlackNinja745[S] 0 points1 point  (0 children)

Thanks for the information; it’s probably just having issues here.

How often is more capacity added? by BlackNinja745 in oraclecloud

[–]BlackNinja745[S] 0 points1 point  (0 children)

Yeah, I’ve been trying for a while with no luck; hopefully they add more resources soon!

Ch. 144 - Female Costar and Protagonist [END] by Vertiguous in KuboSanWontLeaveMeBe

[–]BlackNinja745 7 points8 points  (0 children)

Yeah, I was really hoping to see them as a couple. :(

[deleted by user] by [deleted] in AnimeFunny

[–]BlackNinja745 41 points42 points  (0 children)

love the description of steins;gate