From 3ea746745afcf7de236dfc8ce5423d92e6569786 Mon Sep 17 00:00:00 2001 From: Abdug'ani Toshmukhamedov Date: Wed, 7 Feb 2024 21:50:00 +0500 Subject: [PATCH] docs: translate 2 paras --- rustbook-uz/src/ch15-02-deref.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/rustbook-uz/src/ch15-02-deref.md b/rustbook-uz/src/ch15-02-deref.md index 0827f7a..2e5592c 100644 --- a/rustbook-uz/src/ch15-02-deref.md +++ b/rustbook-uz/src/ch15-02-deref.md @@ -15,20 +15,21 @@ berishini ko'rib chiqamiz. Keyin biz Rustning *deref coercion* xususiyatini va u bizga havolalar yoki smart pointerlar bilan ishlashga qanday imkon berishini ko'rib chiqamiz. -> Note: there’s one big difference between the `MyBox` type we’re about to -> build and the real `Box`: our version will not store its data on the heap. -> We are focusing this example on `Deref`, so where the data is actually stored -> is less important than the pointer-like behavior. +> Eslatma: biz qurmoqchi bo'lgan `MyBox` turi va haqiqiy `Box` o‘rtasida +> bitta katta farq bor: bizning versiyamiz o‘z ma’lumotlarini heapda saqlamaydi. +> Biz ushbu misolda e'tiborimizni `Deref`ga qaratmoqdamiz, shuning uchun +> ma'lumotlarning qayerda saqlanishi pointerga o'xshash xatti-harakatlardan +> kamroq ahamiyatga ega. -### Following the Pointer to the Value +### Pointerni Qiymatga bog'lash -A regular reference is a type of pointer, and one way to think of a pointer is -as an arrow to a value stored somewhere else. In Listing 15-6, we create a -reference to an `i32` value and then use the dereference operator to follow the -reference to the value: +Muntazam havola pointerning bir turi bo'lib, pointerni boshqa joyda saqlangan +qiymatga o'q kabi tasavvur qilishning bir usuli. 15-6 ro'yxatda biz `i32` +qiymatiga havola yaratamiz va keyin qiymatga havolani bog'lash uchun dereference +operatoridan foydalanamiz: Filename: src/main.rs