From fdeec23ab9e33ddf1bf0a1d116a17cf1fc5c02a8 Mon Sep 17 00:00:00 2001 From: 0xf90c Date: Wed, 24 Apr 2024 22:06:53 +0500 Subject: [PATCH] update --- rustbook-uz/src/ch15-04-rc.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/rustbook-uz/src/ch15-04-rc.md b/rustbook-uz/src/ch15-04-rc.md index e01d79a..6d299b4 100644 --- a/rustbook-uz/src/ch15-04-rc.md +++ b/rustbook-uz/src/ch15-04-rc.md @@ -38,11 +38,7 @@ Ushbu kodni kompilyatsiya qilsak, biz yuqoridagi xatolikni ko'ramiz: `Cons` variantlari o'zlariga tegishli bo'lgan ma'lumotlargagina egalik (own) qila oladi, shuninguchun biz `b` ro'yxatini yaratganimizda, `a` `b`ga o'tadi va `b` `a`ga egalik qiladi.Undan keyin, `c` ni yaratish uchun `a`dan foydalanmoqchi bo'lganizmizda bizga ruxsat bermaydi chunki `a` ko'chib ketganligi uchun. -We could change the definition of `Cons` to hold references instead, but then -we would have to specify lifetime parameters. By specifying lifetime -parameters, we would be specifying that every element in the list will live at -least as long as the entire list. This is the case for the elements and lists -in Listing 15-17, but not in every scenario. +Buning o'rniga havolalarni ushlab turish uchun `Cons` ta'rifini o'zgartirishimiz mumkin, lekin keyin biz layvtaym parametrlarini ko'rsatishimiz kerak bo'ladi. Layvtaym parametrlarini belgilash orqali, biz ro'yxatdagi har bir elementning yashashini ko'rsatamiz. 15-17 ro'yxatda ko'rsatilganidek bu elementlar va ro'yxatlarga tegishli, lekin har doim gam emas. Instead, we’ll change our definition of `List` to use `Rc` in place of `Box`, as shown in Listing 15-18. Each `Cons` variant will now hold a value