D. Compilation error due to ownership rules 📌Ответ: Правильный ответ: C — Panic at runtime due to unwrap failure
Почему: Мы создаем a как Rc<RefCell<i32>>, из него делаем b = a.clone() → теперь у Rc два владельца.
Мы мутируем значение через b.borrow_mut(), увеличиваем его на 1.
Затем пытаемся сделать Rc::try_unwrap(b).
⚠️ Rc::try_unwrap требует, чтобы Rc был единственным владельцем. Но у нас всё ещё есть a, то есть ссылка остаётся → unwrap не срабатывает и unwrap() вызывает паник на runtime.
D. Compilation error due to ownership rules 📌Ответ: Правильный ответ: C — Panic at runtime due to unwrap failure
Почему: Мы создаем a как Rc<RefCell<i32>>, из него делаем b = a.clone() → теперь у Rc два владельца.
Мы мутируем значение через b.borrow_mut(), увеличиваем его на 1.
Затем пытаемся сделать Rc::try_unwrap(b).
⚠️ Rc::try_unwrap требует, чтобы Rc был единственным владельцем. Но у нас всё ещё есть a, то есть ссылка остаётся → unwrap не срабатывает и unwrap() вызывает паник на runtime.
Bitcoin is a decentralized digital currency that you can buy, sell and exchange directly, without an intermediary like a bank. Bitcoin’s creator, Satoshi Nakamoto, originally described the need for “an electronic payment system based on cryptographic proof instead of trust.” Each and every Bitcoin transaction that’s ever been made exists on a public ledger accessible to everyone, making transactions hard to reverse and difficult to fake. That’s by design: Core to their decentralized nature, Bitcoins aren’t backed by the government or any issuing institution, and there’s nothing to guarantee their value besides the proof baked in the heart of the system. “The reason why it’s worth money is simply because we, as people, decided it has value—same as gold,” says Anton Mozgovoy, co-founder & CEO of digital financial service company Holyheld.
Telegram is riding high, adding tens of million of users this year. Now the bill is coming due.Telegram is one of the few significant social-media challengers to Facebook Inc., FB -1.90% on a trajectory toward one billion users active each month by the end of 2022, up from roughly 550 million today.