2
票
Accepted
combine ライブラリ使用時のライフタイムエラー
ライフタイムのアノテーションを次のように2か所追加することでコンパイルが通るようになりました:
pub fn integer<'a, I>() -> impl Parser<I, Output = i32> + 'a // + 'aを追加
where
I: RangeStream<Token = char, Range = &'a str> ...
- 377
1
票
SwiftUIの@Publishedついて
weather.temperatureはCurrentValueSubjectなのでしょうねぇ。
Subject | Apple Developer Documentation
期待された動作は、もう一つのSubject、PassthroughSubjectの方の様ですが。
e.g.
let relay = PassthroughSubject<String, Never>()
...
- 36
1
票
Accepted
MVVMで設計した際のModalを挟んだ画面遷移の実装について
ContentViewModelとModalViewModelどちらもにisConfirmedがあるのは仕方ないのでしょうか?
そもそも ContentViewModelのisConfirmedは print でしか使われていません。
(そして値も変わることがなさそうです。つまり使われていないと言えます)
よって、根本的にこの質問は成り立たないように感じます(...
- 5,982
Only top scored, non community-wiki answers of a minimum length are eligible