Skip to content

Conversation

@DogeDark
Copy link
Contributor

@DogeDark DogeDark commented Mar 26, 2025

Adds ReadOnlySignal::create(T) which is a shorthand for ReadOnlySignal::new(Signal::new(T)).

This helps with #3920

Seems like Signal.into() also currently works.

@DogeDark DogeDark added enhancement New feature or request signals Related to the signals crate labels Mar 26, 2025
@DogeDark DogeDark requested a review from a team as a code owner March 26, 2025 22:42
@DogeDark DogeDark requested a review from Copilot March 26, 2025 22:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a helper method, create, to simplify the instantiation of ReadOnlySignal by wrapping a new Signal into the new read-only signal.

  • Introduces a create method as a shorthand for ReadOnlySignal::new(Signal::new(value))
  • Adds the necessary documentation and attributes to the new method

@jkelleyrtp jkelleyrtp closed this May 7, 2025
@DogeDark DogeDark deleted the read-create branch May 7, 2025 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request signals Related to the signals crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants