Просмотр исходного кода

[runtime/vm_runtime] Clarify comment for call()

Make it clear that it is only possible to use a "ContractSection" method
when making a call to `call()`.
y 2 лет назад
Родитель
Сommit
c6d9e495e8
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      src/runtime/vm_runtime.rs

+ 4 - 4
src/runtime/vm_runtime.rs

@@ -318,9 +318,9 @@ impl Runtime {
         Ok(())
     }
 
-    /// Call a contract method using a supplied payload. Returns a Vector of bytes
-    /// corresponding to the result data of the call. For calls that do not return
-    /// any data, an empty Vector is returned.
+    /// Call a contract method defined by a [`ContractSection`] using a supplied
+    /// payload. Returns a Vector of bytes corresponding to the result data of the call.
+    /// For calls that do not return any data, an empty Vector is returned.
     fn call(&mut self, section: ContractSection, payload: &[u8]) -> Result<Vec<u8>> {
         debug!(target: "runtime::vm_runtime", "Calling {} method", section.name());
 
@@ -378,7 +378,7 @@ impl Runtime {
             None => Vec::new(),
         };
 
-        // Determine the return value of the contract call. If ret is empty,
+        // Determine the return value of the contract call. If `ret` is empty,
         // assumed that the contract call was successful.
         let retval: i64 = match ret.len() {
             0 => {